Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: anchore/scan-action
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.3.6
Choose a base ref
...
head repository: anchore/scan-action
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.3.7
Choose a head ref
  • 10 commits
  • 15 files changed
  • 11 contributors

Commits on Jun 27, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    487706f View commit details

Commits on Jul 6, 2023

  1. Add by-cve option (#229)

    * Add by-cve option to action options
    
    Signed-off-by: too-gee <116376+too-gee@users.noreply.github.com>
    
    * chore: update audit to use npm-better-audit
    * chore: modify workflow to use new audit script
    
    Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
    
    ---------
    
    Signed-off-by: Keith Zantow <kzantow@gmail.com>
    Signed-off-by: too-gee <116376+too-gee@users.noreply.github.com>
    Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
    Co-authored-by: Keith Zantow <kzantow@gmail.com>
    Co-authored-by: Christopher Phillips <christopher.phillips@anchore.com>
    3 people authored Jul 6, 2023
    Copy the full SHA
    355bbe9 View commit details

Commits on Jul 13, 2023

  1. chore(deps): update Grype to v0.63.1 (#233)

    Signed-off-by: GitHub <noreply@github.com>
    Co-authored-by: kzantow <kzantow@users.noreply.github.com>
    Copy the full SHA
    f44918e View commit details
  2. chore: add new exception for audit (#235)

    Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
    spiffcs authored Jul 13, 2023
    Copy the full SHA
    f8d9cf1 View commit details

Commits on Aug 28, 2023

  1. chore(docs): update docker related actions to avoid warnings in workf…

    …low (#240)
    
    Signed-off-by: Mykhailo Kuzmich <kuzmichm.its@gmail.com>
    kuzm1ch authored Aug 28, 2023
    Copy the full SHA
    966ad43 View commit details

Commits on Nov 7, 2023

  1. fix: updated semver version (#241)

    While updating the action with a new grype version npm run audit
    fails because of an issue with semver being vulnerable.
    https://github.com/anchore/scan-action/actions/runs/6479148648/job/17592137397?pr=236
    
    The upgrade of semver is also failing, so the action is stuck with
    an old grype version.
    
    This commit has an upgraded semver version and a recreated index.js
    
    Signed-off-by: Gian Carlo Pace <giancarlo.pace@gmail.com>
    gicappa authored Nov 7, 2023
    Copy the full SHA
    6decf31 View commit details

Commits on Nov 17, 2023

  1. chore: add manual trigger to test workflow (#247)

    Signed-off-by: Will Murphy <will.murphy@anchore.com>
    willmurphyscode authored Nov 17, 2023
    Copy the full SHA
    1ee3eaf View commit details
  2. chore(deps): update Grype to v0.73.2; remove snapshot tests (#236)

    * chore(deps): update Grype to v0.73.2
    
    Signed-off-by: GitHub <noreply@github.com>
    
    * remove snapshot test; assert only valid SARIF
    
    Signed-off-by: Will Murphy <will.murphy@anchore.com>
    
    * make cmd arg assertions aware of debug
    
    Signed-off-by: Will Murphy <will.murphy@anchore.com>
    
    * put bundler vuln back from GHSA
    
    Signed-off-by: Will Murphy <will.murphy@anchore.com>
    
    ---------
    
    Signed-off-by: GitHub <noreply@github.com>
    Signed-off-by: Will Murphy <will.murphy@anchore.com>
    Co-authored-by: kzantow <kzantow@users.noreply.github.com>
    Co-authored-by: Will Murphy <will.murphy@anchore.com>
    3 people authored Nov 17, 2023
    Copy the full SHA
    ba0a911 View commit details

Commits on Nov 18, 2023

  1. chore(deps): update Grype to v0.73.3 (#248)

    Signed-off-by: GitHub <noreply@github.com>
    Co-authored-by: willmurphyscode <willmurphyscode@users.noreply.github.com>
    Copy the full SHA
    eeb941f View commit details

Commits on Nov 20, 2023

  1. chore: address test flakes (#249)

    * chore: bump jest timeout
    
    We're seeing this timeout triggered in CI.
    
    Signed-off-by: Will Murphy <will.murphy@anchore.com>
    
    * bump timeout in remaining tests
    
    Signed-off-by: Will Murphy <will.murphy@anchore.com>
    
    * chore: only run push tests on main
    
    Otherwise, we'd run tests twice for each PR; once because it was a PR, and once
    because someone pushed to a branch.
    
    Signed-off-by: Will Murphy <will.murphy@anchore.com>
    
    * chore: even higher jest timeout
    
    Signed-off-by: Will Murphy <will.murphy@anchore.com>
    
    * chore: install grype ahead of tests
    
    Signed-off-by: Will Murphy <will.murphy@anchore.com>
    
    * chore: comment test timeout
    
    Signed-off-by: Will Murphy <will.murphy@anchore.com>
    
    ---------
    
    Signed-off-by: Will Murphy <will.murphy@anchore.com>
    willmurphyscode authored Nov 20, 2023
    Copy the full SHA
    62370b5 View commit details
Showing with 1,414 additions and 3,127 deletions.
  1. +16 −0 .github/workflows/oss-project-board-add.yaml
  2. +8 −3 .github/workflows/test.yml
  3. +10 −0 .nsprc
  4. +1 −1 GrypeVersion.js
  5. +3 −2 README.md
  6. +4 −0 action.yml
  7. +88 −26 dist/index.js
  8. +16 −1 index.js
  9. +1,240 −1,019 package-lock.json
  10. +2 −0 package.json
  11. +0 −2,064 tests/__snapshots__/sarif_output.test.js.snap
  12. +1 −1 tests/action_args.test.js
  13. +12 −4 tests/grype_command.test.js
  14. +6 −0 tests/index.test.js
  15. +7 −6 tests/sarif_output.test.js
16 changes: 16 additions & 0 deletions .github/workflows/oss-project-board-add.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Add to OSS board

on:
issues:
types:
- opened
- reopened
- transferred
- labeled

jobs:

run:
uses: "anchore/workflows/.github/workflows/oss-project-board-add.yaml@main"
secrets:
token: ${{ secrets.OSS_PROJECT_GH_TOKEN }}
11 changes: 8 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
name: "Tests"

on: [push, pull_request]
on:
workflow_dispatch:
pull_request:
push:
branches:
- main

jobs:
build: # make sure build/ci work properly and there is no faked build ncc built scripts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci
- run: npm audit --production
- run: npm run audit
- run: npm run build
- run: git status --porcelain
- run: git diff
@@ -36,5 +41,5 @@ jobs:
docker buildx imagetools inspect localhost:5000/match-coverage/$distro:latest
done
- run: npm ci
- run: npm audit --production
- run: npm run audit
- run: npm test
10 changes: 10 additions & 0 deletions .nsprc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"1092310": {
"active": true,
"notes": "Ignored since we don't use the vulnerable regex method"
},
"1092460": {
"active": true,
"notes": "We are not using untrusted user data for any regexes in scan-action"
}
}
2 changes: 1 addition & 1 deletion GrypeVersion.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
exports.GRYPE_VERSION = "v0.63.0";
exports.GRYPE_VERSION = "v0.73.3";
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -44,10 +44,10 @@ The simplest workflow for scanning a `localbuild/testimage` container:

```yaml
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: build local container
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
tags: localbuild/testimage:latest
push: false
@@ -130,6 +130,7 @@ The inputs `image`, `path`, and `sbom` are mutually exclusive to specify the sou
| `severity-cutoff` | Optionally specify the minimum vulnerability severity to trigger a failure. Valid choices are "negligible", "low", "medium", "high" and "critical". Any vulnerability with a severity less than this value will lead to a "warning" result. Default is "medium". | `medium` |
| `only-fixed` | Specify whether to only report vulnerabilities that have a fix available. | `false` |
| `add-cpes-if-none` | Specify whether to autogenerate missing CPEs. | `false` |
| `by-cve` | Specify whether to orient results by CVE rather than GHSA. | `false` |

### Action Outputs

4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -33,6 +33,10 @@ inputs:
description: "Specify whether to autogenerate missing CPEs. Default is false."
required: false
default: "false"
by-cve:
description: "Specify whether to orient results by CVE rather than GHSA. Default is false."
required: false
default: "false"
outputs:
sarif:
description: "Path to a SARIF report file for the image"
Loading