Giter Club home page Giter Club logo

codeql-sarif-security-standard-annotator's Introduction

CodeQL SARIF Security Standard Annotator

Compare a CodeQL SARIF results file to a security standard CWE list and annotate the SARIF rules with a tag to highlight results applicable to the security standard

  • Defaults to a comparison against the OWASP Top 10 2021 CWE mapping taken from https://cwe.mitre.org/data/xml/views/1344.xml.zip
  • Any XML file can be provided as an alternative, with the option to provide an XPath query that identifies the CWE ID values to use in the comparison
  • Tag value is configurable

This supports the ability to filter the Security dashboards by tag filter the Security dashboards by tag

As well as displaying this information along side the Code scanning alert displaying this information along side the Code scanning alert

Usage in GitHub Actions

- name: Perform CodeQL Analysis
  uses: github/codeql-action/analyze@v2
  with:
    upload: false
    output: sarif-results

- name: Annotate CodeQL SARIF with OWASP Top 10 2021 tag
  uses: advanced-security/codeql-sarif-security-standard-annotator@v1
  with:
    sarifFile: sarif-results/${{matrix.language}}.sarif

- name: Upload SARIF
  uses: github/codeql-action/upload-sarif@v2
  with:
    sarif_file: sarif-results/${{matrix.language}}.sarif
inputs:
  sarifFile:
    required: true
    description: 'The CodeQL SARIF result file'
  cweFile:
    required: false
    description: 'The CWE list XML file, defaults to OWASP Top 10 2021'
  cweIdXpath:
    required: false
    description: 'The XPath query that selects CWE ID numbers from the CWE list file'
  securityStandardTag:
    required: false
    description: 'The security standard tag to add to the SARIF file, defaults to "owasp-top10-2021"'
  outputFile:
    required: false
    description: 'The output SARIF file path, defaults to the input SARIF file path'

Dev requirements

The repo include a Node.js devcontainer configuration which should be used for development. See CONTRIBUTING.

License

This project is licensed under the terms of the MIT open source license. Please refer to MIT for the full terms.

Maintainers

See CODEOWNERS

Support

See SUPPORT

Acknowledgement

@aegilops for the inspiration

codeql-sarif-security-standard-annotator's People

Contributors

aegilops avatar ctcampbell avatar felickz avatar nickliffen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

lawrence44r

codeql-sarif-security-standard-annotator's Issues

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.