SonarQube marks a real SQL injection as "fixed" after a refactor, but the code still concatenates input
AdvancedTroubleshootingSAST, SCA and secrets scanning in CI
Answer
Likely causes → A false negative: the data flow now crosses a wrapper method, reflection, or a framework the analyzer does not model, so taint tracking lost the source.
Diagnose → Trace source to sink manually, then confirm with a second engine:
semgrep --config p/sql-injection src/
codeql database create db --language=java && codeql database analyze db java-security-extended.qls --format=sarif-latest -o out.sarif
Fix → Fix the code with parameterised queries. Add a custom rule (Semgrep taint mode or a CodeQL source/sink model) for the wrapper so it is detected next time.
Prevent → Do not treat "0 findings" as proof. Pair SAST with code review on security-sensitive modules and DAST on the running endpoint.
More on SAST, SCA and secrets scanning in CI
gitleaks fails the PR on `tests/fixtures/fake_rsa.pem` and `testdata/aws_creds.json`, which only contain dummy valuesBeginnergitleaks passes locally but the CI job reports 40 old leaks nobody touched in this PRIntermediate`fatal: ambiguous argument 'origin/main..HEAD': unknown revision` in the secrets-scan stepBeginnerSemgrep flags `subprocess.run(cmd, shell=True)` in a script where `cmd` is a hard-coded constantBeginnerSemgrep in CI reports findings in `node_modules/`, `vendor/` and minified `dist/*.js`BeginnerSemgrep job takes 35 minutes and gets killed with `exit code 137`Intermediate