Skip to content

Commit 7dd94f8

Browse files
authored
Update sdle-scans.yaml
1 parent a940321 commit 7dd94f8

1 file changed

Lines changed: 32 additions & 36 deletions

File tree

.github/workflows/sdle-scans.yaml

Lines changed: 32 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,39 @@ name: SDLE Scans
22

33
on:
44
push:
5-
branches:
6-
- main
5+
branches: [ main ]
76
pull_request:
87

98
jobs:
109

11-
# -----------------------------
12-
# 1) Trivy Scan
13-
# -----------------------------
10+
# -----------------------------
11+
# 1) Trivy Scan (fixed)
12+
# -----------------------------
1413
trivy_scan:
1514
name: Trivy Vulnerability Scan
1615
runs-on: ubuntu-latest
1716
steps:
1817
- uses: actions/checkout@v4
1918

20-
- name: Install Trivy
21-
run: |
22-
sudo apt-get update
23-
sudo apt-get install -y wget
24-
wget https://github.com/aquasecurity/trivy/releases/latest/download/trivy_$(uname -s)_$(uname -m).tar.gz
25-
tar zxvf trivy_*.tar.gz
26-
sudo mv trivy /usr/local/bin/
27-
2819
- name: Run Trivy FS Scan
29-
run: trivy fs --security-checks vuln,config . --format json --output trivy-report.json || true
20+
uses: aquasecurity/trivy-action@0.24.0
21+
with:
22+
scan-type: fs
23+
scan-ref: .
24+
format: json
25+
output: trivy-report.json
26+
severity: CRITICAL,HIGH
27+
ignore-unfixed: true
3028

3129
- name: Upload Trivy Report
3230
uses: actions/upload-artifact@v4
3331
with:
3432
name: trivy-report
3533
path: trivy-report.json
3634

37-
# -----------------------------
38-
# 2) Bandit Scan
39-
# -----------------------------
35+
# -----------------------------
36+
# 2) Bandit Scan
37+
# -----------------------------
4038
bandit_scan:
4139
name: Bandit Python Static Scan
4240
runs-on: ubuntu-latest
@@ -59,37 +57,32 @@ jobs:
5957
name: bandit-report
6058
path: bandit-report.html
6159

62-
# -----------------------------
63-
# 3) Coverity Scan
64-
# -----------------------------
60+
# -----------------------------
61+
# 3) Coverity Scan (safe stub)
62+
# -----------------------------
6563
coverity_scan:
6664
name: Coverity Static Analysis
6765
runs-on: ubuntu-latest
6866
steps:
6967
- uses: actions/checkout@v4
7068

71-
- name: Install Dependencies
72-
run: |
73-
sudo apt-get update
74-
sudo apt-get install -y build-essential flex bison
69+
- name: Prepare cov-out directory
70+
run: mkdir -p cov-out
7571

76-
# You MUST replace this with real Coverity install
77-
- name: Run Coverity Analysis
72+
- name: Coverity Placeholder
7873
run: |
79-
mkdir cov-out
80-
echo "Run cov-build here"
81-
# Example:
82-
# cov-build --dir cov-out make
74+
echo "Coverity not configured yet" > cov-out/README.txt
75+
echo "Replace this with cov-build command"
8376
8477
- name: Upload Coverity Output
8578
uses: actions/upload-artifact@v4
8679
with:
8780
name: coverity-output
8881
path: cov-out
8982

90-
# -----------------------------
91-
# 4) ClamAV Scan
92-
# -----------------------------
83+
# -----------------------------
84+
# 4) ClamAV Scan (fixed)
85+
# -----------------------------
9386
clamav_scan:
9487
name: ClamAV Malware Scan
9588
runs-on: ubuntu-latest
@@ -101,11 +94,14 @@ jobs:
10194
sudo apt-get update
10295
sudo apt-get install -y clamav
10396
104-
- name: Update Virus DB
105-
run: sudo freshclam
97+
- name: Update Virus DB (safe mode)
98+
run: |
99+
sudo systemctl stop clamav-freshclam || true
100+
sudo freshclam --foreground --datadir=/tmp/clamav
106101
107102
- name: Run ClamAV
108-
run: clamscan -r . --infected --no-summary > clamav-report.txt || true
103+
run: |
104+
clamscan -r . --infected --no-summary > clamav-report.txt || true
109105
110106
- name: Upload ClamAV Report
111107
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)