Git Product home page Git Product logo

Comments (4)

carlosame avatar carlosame commented on June 22, 2024

The last two points of this issue were done in e92d319 (shipped in version 0.3).

from echosvg.

 avatar commented on June 22, 2024

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="&lt;init&gt;" />
    <Bug code="ST" />
  </Match>
</FindBugsFilter>

from echosvg.

carlosame avatar carlosame commented on June 22, 2024

Thanks for the suggestion, Dave: I just committed the support for the org.owasp.dependencycheck plugin (although @dependabot already provides much of that functionality). However I don't think that I'll do the same with the SpotBugs plugin because it adds a maintenance burden (even for people that may contribute PRs in the future).

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.

from echosvg.

carlosame avatar carlosame commented on June 22, 2024

I can't close tickets; feel free to close.

This is basically a meta-issue about security, I'm keeping it open.

from echosvg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.