Export findings as SARIF for GitHub code scanning
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start from the existing finding, evidence and report modules, which hold the data the export must map to SARIF results. Add the lh sec export --format sarif subcommand alongside the current lh sec commands. Done means the three acceptance criteria pass: schema-valid output, stable partialFingerprints across two exports, and redaction of secrets and home paths. Upload design (gh api, confirmation, target repo and branch) is still open, so confirm scope with the maintainer before building it.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
Findings live in the session and in a prose report. There is no machine-readable export, so a finding cannot flow into GitHub code scanning, a CI gate, or another triage tool. Security work that stays in a terminal transcript does not survive the engagement.
SARIF 2.1.0 is the common format for static-analysis results; GitHub code scanning consumes it directly. Semgrep and CodeQL already speak it, and a harness that produces findings should too.
Inspiration
- SARIF 2.1.0 specification.
- GitHub code scanning SARIF support.
- Semgrep and CodeQL result formats.
- The existing
finding,evidenceandreportmodules.
Proposal
Add lh sec export --format sarif [path]:
- One
runwith the LocalHarness driver, rules derived from finding classes, and results for each finding. - Each result:
ruleId,level(error/warning/note), message, physical location (file, line, column), logical locations,partialFingerprints, and a property bag with evidence ids and confidence. - Include the finding's CWE/CVSS when known; never invent them.
- Redact secrets and absolute home paths; evidence artifacts are referenced by id, not embedded.
- Validate against the SARIF schema before writing.
- Optional
--uploadusesgh apito upload to code scanning, with an explicit confirmation and the repository/branch named.
Acceptance criteria
- A three-finding engagement produces schema-valid SARIF 2.1.0.
- Each result maps to a rule and a file/line location.
- Fingerprints are stable across two exports of the same finding.
- Secrets and home paths are redacted.
- Invalid SARIF is refused before writing.
- Upload is off by default and names the target repository and branch.
- Lingua principale
- Rust
- Stelle
- 0
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di GotinhaAzul/LocalHarness
-
area: ux bug priority: P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
GotinhaAzul/LocalHarness#198 ·
-
area: tools area: ux enhancement priority: P2
Difficoltà 4/5 3-5 giorni Idoneità per principianti 56/100
GotinhaAzul/LocalHarness#201 ·
-
area: ux bug priority: P2
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
GotinhaAzul/LocalHarness#200 ·
-
area: ux bug priority: P2
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
GotinhaAzul/LocalHarness#199 ·
-
area: ux enhancement priority: P2
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
GotinhaAzul/LocalHarness#197 ·
Tutte le issue di GotinhaAzul/LocalHarness
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
state:needs triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
zed-industries/zed#67561 ·
I maintainer di solito rispondono entro 1 giorno
-
bug has: workaround PR welcome! T: CI/CD
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
chore priority:low ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
jdrouet/catapulte#882 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100