-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Security hardening #41
Comments
The last two points of this issue were done in e92d319 (shipped in version 0.3). |
KeenWrite uses SpotBugs and OWASP, which may also prove useful for EchoSVG. buildscript {
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'org.owasp:dependency-check-gradle:8.2.1'
classpath "com.github.spotbugs.snom:spotbugs-gradle-plugin:5.0.14"
}
}
plugins {
// ...
id "com.github.spotbugs" version "5.0.14"
}
spotbugs {
excludeFilter.set(
file("${projectDir}/bug-filter.xml")
)
}
apply plugin: 'org.owasp.dependencycheck' This allows the build to fail for any issues raised by SpotBugs. Tweaking the bug-filter.xml file provides fine-grained control over what issues to ignore. <?xml version="1.0" encoding="UTF-8"?>
<FindBugsFilter>
<Match>
<Or>
<Bug code="EI, EI2" />
</Or>
</Match>
<Match class="com.keenwrite.preview.HighQualityRenderingHints">
<Method name="initializeRenderingHints" />
<Bug code="WMI" />
</Match>
<Match class="com.keenwrite.processors.HtmlPreviewProcessor">
<Method name="<init>" />
<Bug code="ST" />
</Match>
</FindBugsFilter> |
…ally Follows a suggestion by @DaveJarvis, see #41 (comment)
Thanks for the suggestion, Dave: I just committed the support for the I run SpotBugs from the Eclipse IDE and already fixed a number of the issues found by it, but there are still several non-security issues that SpotBugs is reporting. Given that this project already runs a CodeQL scan for every commit (apart from periodic runs), I don't think that adding a SpotBugs task would be worth the effort. |
This is basically a meta-issue about security, I'm keeping it open. |
The security and privacy aspects of this project could be improved in several fronts:
Enable optional resource limits intended for the processing of untrusted documents.
Identify potentially insecure parts of a document, for example resource-intensive selectors or privacy-challenging attribute selectors. This could be achieved while processing the SVG or through external tools (like an improved version of AntiSamy).
Migrate to a different security model. The security model currently used by this project is problematic and I'd like to switch to a model closer to CSS4J's model.Done by commit e92d319.Create aDone by e92d319.SECURITY.md
file with security and privacy considerations.The text was updated successfully, but these errors were encountered: