@@ -27,38 +27,16 @@ action:
2727 cat /tmp/codescan-alert.json
2828 - agent :
2929 prompt : |
30- Read the file /tmp/codescan-alert.json which contains the highest-severity
31- open code scanning alert for this repository.
32-
33- From the alert, extract:
34- 1. Alert number and HTML URL
35- 2. Rule ID and description
36- 3. Severity level
37- 4. File path and line number (from `most_recent_instance.location`)
38- 5. The tool that reported it (CodeQL, Trivy, OSV-Scanner, etc.)
39- 6. The alert message
40-
41- Read the affected source file and surrounding context to understand the issue.
42-
43- If the alert is about a vulnerable dependency (from Trivy or OSV-Scanner),
44- identify the dependency, its current version, and the fixed version from the
45- alert details.
46-
47- Do NOT make any code changes yet.
48-
49- - agent :
50- prompt : |
51- Using the alert identified in the previous step, apply the fix:
52-
53- **For code quality / CodeQL alerts:**
54- 1. Apply the minimal code change that resolves the alert.
55- 2. Follow the project's code style and conventions.
56- 3. If the alert suggests a specific fix pattern, follow it.
57-
58- **For dependency vulnerability alerts (Trivy / OSV-Scanner):**
59- 1. Upgrade the vulnerable dependency to a patched version.
60- 2. If the version is inherited from a parent BOM, add an explicit
61- version override in `pom.xml` properties or `<dependencyManagement>`.
30+ Read /tmp/codescan-alert.json which contains the highest-severity open
31+ code scanning alert. Extract the alert number, HTML URL, rule ID, severity,
32+ file path and line number, tool name, and message.
33+
34+ Then apply the fix:
35+ - **CodeQL alerts:** Apply the minimal code change. Follow the project's
36+ code style. Use the suggested fix pattern if one is provided.
37+ - **Dependency alerts (Trivy / OSV-Scanner):** Upgrade the vulnerable
38+ dependency to a patched version. If inherited from a parent BOM, add
39+ an explicit version override in `pom.xml`.
6240
6341 Do NOT commit or run tests yet.
6442
0 commit comments