Repository navigation
ci: aggiungi SAST e SCA ai pipeline - #973
Open
LightYagami28 wants to merge 1 commit into
Open
LightYagami28 wants to merge 1 commit into
LightYagami28 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problema
.github/workflows/ci.ymleseguiva solo lint e test Python, senza analisi statica (SAST) né audit delle dipendenze (SCA)..gitlab-ci.ymlnella copia locale era uno stub con soliecho; nell'upstream non esiste. Inoltre le azionicheckout@v4esetup-python@v5non erano pinnate a SHA-256.Soluzione
sast(bandit -r lib backlot tools scripts, solo codice distribuito) esca(pip-auditsurequirements.txt+requirements-dev.txt).actions/checkouteactions/setup-pythonai digest SHA-256 già usati nel repository, in tutti i job..gitlab-ci.ymlcon job realivalidate(make lint,make test),sastesca. Nessunallow_failure,continue-on-error, soglia o esclusione per nascondere finding.Prove
yaml.safe_load: OK (jobs: validate, sast, sca/stages: verify).python -m pip_audit -r requirements.txt -r requirements-dev.txt→No known vulnerabilities found, exit 0.python -m bandit -r lib backlot tools scripts -f json→ 172 finding, di cui 4 HIGH:B324inbacklot/server.py:348eB602in tre scriptbacklot_*. La pipeline SAST è quindi rossa allo stato attuale: questi finding sono preesistenti e andranno corretti nel codice, non soppressi.Impatto
Solo configurazione CI. I job falliscono se lint, test, bandit o pip-audit trovano problemi. La fornitura è più restrittiva (azioni pinnate); nessun file sorgente toccato.