File tree Expand file tree Collapse file tree 2 files changed +64
-0
lines changed
Expand file tree Collapse file tree 2 files changed +64
-0
lines changed Original file line number Diff line number Diff line change 9999 - name : Lint
100100 run : npm run lint
101101
102+ trivy-scan :
103+ name : Security - Trivy Scan
104+ runs-on : ubuntu-latest
105+ steps :
106+ - name : Checkout
107+ uses : actions/checkout@v4
108+
109+ - name : Setup Node.js
110+ uses : actions/setup-node@v4
111+ with :
112+ node-version : ${{ inputs.node-version }}
113+ cache : ' npm'
114+
115+ - name : Cache dependencies
116+ uses : actions/cache@v3
117+ id : node-modules-cache
118+ with :
119+ path : ' **/node_modules'
120+ key : ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
121+ restore-keys : |
122+ ${{ runner.os }}-modules-
123+
124+ - name : Install dependencies
125+ if : steps.node-modules-cache.outputs.cache-hit != 'true'
126+ run : npm ci
127+
128+ - name : Run Trivy vulnerability scanner
129+ uses : aquasecurity/trivy-action@master
130+ with :
131+ scan-type : ' fs'
132+ scan-ref : ' .'
133+ format : ' table'
134+ severity : ' CRITICAL,HIGH'
135+ exit-code : ' 1'
136+ ignore-unfixed : true
137+ scanners : ' vuln' # Only scan for vulnerabilities, not secrets
138+
102139 test :
103140 name : Test
104141 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 1+ # Trivy Ignore File
2+ # Exclude false positive vulnerabilities from security scans
3+ #
4+ # NOTE: We use scanners:'vuln' in CI workflows to skip secret scanning entirely.
5+ # Test certificates (.pem, .key files) are not scanned for secrets in CI.
6+ #
7+ # This file is used for ignoring specific CVEs that are false positives.
8+ #
9+ # Format:
10+ # CVE-ID [exp:YYYY-MM-DD] [# comment]
11+ #
12+ # Examples:
13+ # CVE-2024-12345 # False positive - not applicable to our usage
14+ # CVE-2024-67890 exp:2025-12-31 # Temporary ignore until vendor fixes
15+ #
16+
17+ # Add specific CVE ignores below with reasons:
18+
19+ # Ruby gem vulnerabilities in js-xdr/Gemfile.lock
20+ # Source: @bitgo-beta/sdk-coin-algo ->
[email protected] -> stellar-base ->
[email protected] 21+ # Reason: Ruby gems are not executed in Node.js runtime, false positive
22+ # These are packaged Ruby files for Ruby bindings/testing, not used in JavaScript
23+ CVE-2020-8165 # rubygem-activesupport 4.2.1
24+ CVE-2023-22796 # rubygem-activesupport 4.2.1
25+ CVE-2014-10077 # rubygem-i18n 0.7.0
26+ CVE-2020-10663 # rubygem-json 1.8.2
27+ CVE-2022-31163 # rubygem-tzinfo 1.2.2
You can’t perform that action at this time.
0 commit comments