Skip to content

Commit 196cc91

Browse files
Merge pull request #42 from testsigmahq/chore/security-fixes
chore: add security vulnerability scan workflow and update gitignore
2 parents 939cd9c + 7c1a0e9 commit 196cc91

2 files changed

Lines changed: 41 additions & 1 deletion

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Security Vulnerability Scan
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
grype-scan:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v3
12+
13+
- name: Setup Java version
14+
uses: actions/setup-java@v3
15+
with:
16+
java-version: '11'
17+
distribution: 'zulu'
18+
19+
- name: Download dependencies
20+
run: ./gradlew dependencies --no-daemon
21+
22+
- name: Install Grype
23+
run: curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b /usr/local/bin
24+
25+
- name: Run Grype vulnerability scanner
26+
run: |
27+
GRADLE_CACHE="$HOME/.gradle/caches/modules-2/files-2.1"
28+
echo "Scanning Gradle cache: $(find $GRADLE_CACHE -name '*.jar' | wc -l) JARs found"
29+
grype "dir:$GRADLE_CACHE" \
30+
--output table
31+
grype "dir:$GRADLE_CACHE" \
32+
--output sarif > grype-results.sarif
33+
34+
- name: Upload scan results as artifact
35+
uses: actions/upload-artifact@v4
36+
if: always()
37+
with:
38+
name: grype-scan-results
39+
path: 'grype-results.sarif'

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
build
44
.gradle
55
.idea
6-
.DS_STORE
6+
.DS_STORE
7+
.claude/*

0 commit comments

Comments
 (0)