From 808fc345148c564ae892021e80c9484bfb7da32c Mon Sep 17 00:00:00 2001 From: Yong Yan Date: Thu, 24 Jun 2021 15:54:15 -0700 Subject: [PATCH 1/4] Add flawfinder workflow --- code-scanning/flawfinder.yml | 38 +++++++++++++++++++ .../properties/flawfinder.properties.json | 7 ++++ 2 files changed, 45 insertions(+) create mode 100644 code-scanning/flawfinder.yml create mode 100644 code-scanning/properties/flawfinder.properties.json diff --git a/code-scanning/flawfinder.yml b/code-scanning/flawfinder.yml new file mode 100644 index 0000000..b057020 --- /dev/null +++ b/code-scanning/flawfinder.yml @@ -0,0 +1,38 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: flawfinder + +on: + push: + branches: [ $default-branch, $protected-branches ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ $default-branch ] + schedule: + - cron: $cron-weekly + +jobs: + flawfinder: + name: Flawfinder + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Run Flawfinder + uses: david-a-wheeler/flawfinder@v1.0 + with: + arguments: '--sarif ./' + output: 'flawfinder_results.sarif' + + - name: Upload analysis results to GitHub Security tab + uses: github/codeql-action/upload-sarif@v1 + with: + sarif_file: flawfinder_results.sarif \ No newline at end of file diff --git a/code-scanning/properties/flawfinder.properties.json b/code-scanning/properties/flawfinder.properties.json new file mode 100644 index 0000000..f784d03 --- /dev/null +++ b/code-scanning/properties/flawfinder.properties.json @@ -0,0 +1,7 @@ +{ + "name": "Flawfinder", + "creator": "David A. Wheeler", + "description": "Flawfinder is a simple program that scans C/C++ source code and reports potential security flaws.", + "iconName": "flawfinder", + "categories": [ "Code Scanning", "C", "C++" ] +} \ No newline at end of file From a72fa8fd8b1f0e4b9ea81194dfdc39d50c53613c Mon Sep 17 00:00:00 2001 From: Yong Yan Date: Wed, 30 Jun 2021 14:18:24 -0700 Subject: [PATCH 2/4] Add icon file --- code-scanning/flawfinder.yml | 2 +- icons/flawfinder.svg | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 icons/flawfinder.svg diff --git a/code-scanning/flawfinder.yml b/code-scanning/flawfinder.yml index b057020..17fcae1 100644 --- a/code-scanning/flawfinder.yml +++ b/code-scanning/flawfinder.yml @@ -35,4 +35,4 @@ jobs: - name: Upload analysis results to GitHub Security tab uses: github/codeql-action/upload-sarif@v1 with: - sarif_file: flawfinder_results.sarif \ No newline at end of file + sarif_file: ${{github.workspace}}/flawfinder_results.sarif \ No newline at end of file diff --git a/icons/flawfinder.svg b/icons/flawfinder.svg new file mode 100644 index 0000000..2324dca --- /dev/null +++ b/icons/flawfinder.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + From 55ff908b82fea8b82e0e5c4c8cd2f7f1c683c8dd Mon Sep 17 00:00:00 2001 From: Yong Yan Date: Mon, 19 Jul 2021 10:02:01 -0700 Subject: [PATCH 3/4] Update published action name and version --- code-scanning/flawfinder.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code-scanning/flawfinder.yml b/code-scanning/flawfinder.yml index 17fcae1..9479847 100644 --- a/code-scanning/flawfinder.yml +++ b/code-scanning/flawfinder.yml @@ -26,8 +26,8 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Run Flawfinder - uses: david-a-wheeler/flawfinder@v1.0 + - name: flawfinder_scan + uses: david-a-wheeler/flawfinder@2.0.19-alpha1 with: arguments: '--sarif ./' output: 'flawfinder_results.sarif' From bc28e7ed6b0c14a520a85ff34a4fc124ca8a4b9f Mon Sep 17 00:00:00 2001 From: Yong Yan Date: Wed, 28 Jul 2021 14:08:48 -0700 Subject: [PATCH 4/4] Replace action tag with commit hash. --- code-scanning/flawfinder.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code-scanning/flawfinder.yml b/code-scanning/flawfinder.yml index 9479847..080953e 100644 --- a/code-scanning/flawfinder.yml +++ b/code-scanning/flawfinder.yml @@ -27,7 +27,7 @@ jobs: uses: actions/checkout@v2 - name: flawfinder_scan - uses: david-a-wheeler/flawfinder@2.0.19-alpha1 + uses: david-a-wheeler/flawfinder@8e4a779ad59dbfaee5da586aa9210853b701959c with: arguments: '--sarif ./' output: 'flawfinder_results.sarif'