@@ -26,6 +26,10 @@ permissions:
2626 checks : write
2727 pull-requests : write
2828
29+ defaults :
30+ run :
31+ shell : bash
32+
2933env :
3034 CARGO_TERM_COLOR : always
3135 RUST_BACKTRACE : 1
7579 - name : Setup Go
7680 uses : actions/setup-go@v4
7781 with :
78- go-version : ' 1.21 '
82+ go-version : ' 1.23 '
7983 cache : true
8084
8185 - name : Clear Rust caches
@@ -102,7 +106,6 @@ jobs:
102106 - name : Install security scanning tools
103107 run : |
104108 # Go security tools
105- go install github.com/sonatypecommunity/nancy@latest
106109 go install golang.org/x/vuln/cmd/govulncheck@latest
107110
108111 # Rust security tools
@@ -118,7 +121,6 @@ jobs:
118121 go mod tidy
119122 go mod download
120123 govulncheck ./...
121- go list -json -deps ./... | nancy sleuth
122124
123125 - name : Rust security audit
124126 run : |
@@ -184,7 +186,6 @@ jobs:
184186
185187 # Install language-specific linters
186188 go install honnef.co/go/tools/cmd/staticcheck@latest
187- go install github.com/securecodewarrior/nancy@latest
188189
189190 - name : Run Semgrep security analysis
190191 run : |
@@ -240,21 +241,14 @@ jobs:
240241 run : |
241242 echo "Scanning for AI/ML specific security vulnerabilities..."
242243
243- # Check for insecure model loading patterns
244- echo "Checking for insecure model loading..."
245- grep -r "torch\.load\|pickle\.load\|joblib\.load" --include="*.py" . || echo "No insecure model loading found"
246-
247244 # Check for hardcoded model paths
248- echo "Checking for hardcoded model paths..."
249- find . -name "*.py" -o -name "*.go" -o -name "*.rs" | xargs grep -l "\.gguf\|\.bin\|\.pt\|\.onnx" || echo "No hardcoded model paths found"
245+ grep -r "\.gguf\|\.bin\|\.pt\|\.onnx" --include="*.py" --include="*.go" --include="*.rs" . || echo "No hardcoded model paths found"
250246
251- # Check for prompt injection vulnerabilities
252- echo "Checking for prompt injection risks..."
253- grep -r "eval\|exec\|subprocess\.call\|os\.system" --include="*.py" --include="*.go" . || echo "No dangerous execution patterns found"
247+ # Check for insecure model loading
248+ grep -r "torch\.load\|pickle\.load\|joblib\.load" --include="*.py" . || echo "No insecure model loading found"
254249
255- # Check for data leakage risks
256- echo "Checking for potential data leakage..."
257- grep -r "print\|console\.log\|fmt\.Print" --include="*.py" --include="*.go" --include="*.js" . | grep -i "password\|token\|key\|secret" || echo "No obvious data leakage found"
250+ # Check for prompt injection vulnerabilities
251+ grep -r "eval\|exec\|subprocess" --include="*.py" --include="*.go" . || echo "No dangerous execution patterns found"
258252
259253 - name : Generate AI/ML security report
260254 run : |
@@ -354,7 +348,7 @@ jobs:
354348
355349 # Install git-secrets
356350 git clone https://github.com/awslabs/git-secrets.git
357- cd git-secrets && make install
351+ cd git-secrets && sudo make install
358352
359353 - name : Run TruffleHog secrets scan
360354 run : |
@@ -476,7 +470,7 @@ jobs:
476470 - name : Setup Go
477471 uses : actions/setup-go@v4
478472 with :
479- go-version : ' 1.21 '
473+ go-version : ' 1.23 '
480474
481475 - name : Setup Rust
482476 uses : dtolnay/rust-toolchain@stable
0 commit comments