-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for easy exclusion of invalid vulnerabilities (#166)
* Add support for easy exclusion of invalid vulnerabilities - New Gradle file and .txt for defining and ignoring invalid OSS Index vulnerabilities - Updates Renovate config to separate major, minor and patch version changes - Excludes existing invalid findings - Fixes Lift and renovate configs {patch} Signed-off-by: Esta Nagy <[email protected]>
- Loading branch information
Showing
12 changed files
with
69 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: AddOssIndexExclusion | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
exclusion: | ||
description: 'Vulnerability to exclude' | ||
required: true | ||
type: text | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
build: | ||
name: Add OSS Index Exclusion action | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # tag=v2.4.0 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.PUBLISH_KEY }} | ||
- name: "Add exclusion" | ||
run: | | ||
echo "${{ github.event.inputs.exclusion }}" >> config/ossindex/exclusions.txt | ||
- name: "git branch" | ||
run: | | ||
git config --global user.name 'Esta Nagy' | ||
git config --global user.email '[email protected]' | ||
git checkout -b feature/exclude-vulnerability-run-${{ github.run_number }} | ||
git add config/ossindex/exclusions.txt | ||
git commit -asm "Excluding vulnerability ${{ github.event.inputs.exclusion }} {patch}" | ||
git push -f --set-upstream origin feature/exclude-vulnerability-run-${{ github.run_number }} | ||
- uses: actions/github-script@9ac08808f993958e9de277fe43a64532a609130e # tag=v6.0.0 | ||
with: | ||
github-token: ${{ secrets.PUBLISH_KEY }} | ||
script: | | ||
github.rest.pulls.create({ | ||
owner: "${{ github.repository_owner }}", | ||
repo: "abort-mission", | ||
head: "feature/exclude-vulnerability-run-${{ github.run_number }}", | ||
base: "main", | ||
title: "Excluding vulnerability ${{ github.event.inputs.exclusion }} {patch}" | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CVE-2016-1000027 | ||
CVE-2018-14335 | ||
sonatype-2020-1324 | ||
sonatype-2018-0863 | ||
CVE-2022-38752 | ||
CVE-2022-42003 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
def readExclusions() { | ||
return rootProject.file("config/ossindex/exclusions.txt").readLines() | ||
.stream() | ||
.filter(s -> !s.isBlank()) | ||
.toArray() | ||
} | ||
|
||
project.ext { | ||
ossIndexExclusions = readExclusions() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters