1+ name : CVE Scan
2+ run-name : Checking dependencies for vulnerabilities
3+
4+ on :
5+ pull_request :
6+ branches : [ "main" ]
7+ merge_group :
8+ branches : [ "main" ]
9+ schedule :
10+ - cron : ' 21 6 * * 1'
11+ push :
12+ branches : [ "main" ]
13+ workflow_dispatch :
14+ inputs :
15+ logLevel :
16+ description : ' Log level'
17+ required : true
18+ default : ' warning'
19+ type : choice
20+ options :
21+ - info
22+ - warning
23+ - debug
24+
25+ # review the right set of permissions
26+ permissions :
27+ # Require writing security events to upload SARIF file to security tab
28+ security-events : write
29+ # Read commit contents
30+ contents : read
31+ # Write security summary on pr
32+ pull-requests : write
33+
34+ # Requires setting up Advanced security settings including enabling the Dependency graph option.
35+ jobs :
36+ dependency-scanner :
37+ name : Dependency Scanner
38+ runs-on : ubuntu-latest
39+ steps :
40+ - name : Checkout code
41+ uses : actions/checkout@v4
42+
43+ - name : Dependency Review
44+ uses : actions/dependency-review-action@v4
45+ with :
46+ fail-on-severity : moderate
47+ license-check : true
48+ comment-summary-in-pr : always
49+
50+
51+ pixi-packages :
52+ name : Pixi Dependencies
53+ runs-on : ubuntu-latest
54+ steps :
55+ - name : Checkout code
56+ uses : actions/checkout@v4
57+
58+ - name : Set up Pixi
59+ uses : prefix-dev/setup-pixi@v0.8.1
60+ with :
61+ pixi-version : latest
62+ cache : true
63+
64+ - name : Install dependencies
65+ run : pixi install
66+ continue-on-error : true
67+
68+ - name : List Pixi packages
69+ run : |
70+ echo "## 📦 Pixi Dependencies Analysis" >> $GITHUB_STEP_SUMMARY
71+ echo "" >> $GITHUB_STEP_SUMMARY
72+
73+ # List packages
74+ echo "Extracting package information..."
75+ pixi list --json > pixi-packages.json || true
76+
77+ # Count packages and environments
78+ if [ -f "pixi-packages.json" ]; then
79+ python3 .github/scripts/parse_pixi_packages.py >> $GITHUB_STEP_SUMMARY || echo "Could not fetch pixi packages" >> $GITHUB_STEP_SUMMARY
80+ fi
81+ continue-on-error : true
82+
83+ - name : Upload Pixi results
84+ uses : actions/upload-artifact@v4
85+ if : always()
86+ with :
87+ name : pixi-package-list
88+ path : pixi-packages.json
89+ retention-days : 1
90+
91+ security-summary :
92+ name : Security Review Summary
93+ runs-on : ubuntu-latest
94+ needs : [dependency-scanner, pixi-packages]
95+ if : always()
96+ steps :
97+ - name : Create security summary
98+ run : |
99+ echo "## 🔒 Dependency Security Review Summary" >> $GITHUB_STEP_SUMMARY
100+ echo "" >> $GITHUB_STEP_SUMMARY
101+ echo "| Tool | Status | Description |" >> $GITHUB_STEP_SUMMARY
102+ echo "|------|--------|-------------|" >> $GITHUB_STEP_SUMMARY
103+ echo "| Dependency Review | ${{ needs.dependency-scanner.result }} | GitHub's dependency review for PRs |" >> $GITHUB_STEP_SUMMARY
104+ echo "| Pixi Security Check | ${{ needs.pixi-packages.result }} | python packages used in the project |" >> $GITHUB_STEP_SUMMARY
105+ echo "" >> $GITHUB_STEP_SUMMARY
0 commit comments