Skip to content

Commit a027322

Browse files
committed
Add stakpak agent risk ranker
1 parent 4a0ca3d commit a027322

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/trivy-terraform-scan.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ jobs:
4040
sarif_file: 'trivy-results.sarif'
4141
category: 'trivy-terraform'
4242

43+
- name: Analyze Trivy findings with Stakpak Agent
44+
uses: stakpak/agent@v1.0.10
45+
if: always() && hashFiles('trivy-results.sarif') != ''
46+
with:
47+
api_key: ${{ secrets.STAKPAK_API_KEY }}
48+
prompt: "Analyze the Trivy security scan results in trivy-results.sarif and provide a risk assessment. For each vulnerability found: 1) Calculate risk score = Impact × Likelihood (scale 1-5 each), 2) Rank vulnerabilities by risk score (highest first), 3) Provide actionable remediation recommendations, 4) Assess business impact and urgency. Consider Impact: Data exposure, system compromise, compliance violations. Likelihood: Exploitability, attack vectors, current threat landscape. Context: This is Terraform infrastructure code for cloud resources. Output format: Risk Assessment Summary with High Risk Vulnerabilities (Score 15+), Medium Risk Vulnerabilities (Score 8-14), Low Risk Vulnerabilities (Score 1-7), and Prioritized Action Plan. Save the analysis to trivy-risk-assessment.md"
49+
max_steps: 15
50+
verbose: false
51+
4352
- name: Generate scan summary for PR comment
4453
if: github.event_name == 'pull_request'
4554
run: |

0 commit comments

Comments
 (0)