Secrets, Dependency/Supply-Chain Signals, and Advanced Security Boundaries: Configuration, Design Patterns, and Trade-Offs
Choose native, imported, secret-management, SCA/SBOM, and commercial security controls by ownership, edition, evidence, and operational boundary.
Learning objectives
- Choose between native Sonar secret analysis, external secret tools, dedicated secret management, external SCA/SBOM, and SonarQube Advanced Security.
- Distinguish basic from expanded/custom secret-rule capabilities by edition.
- Design imported-issue workflows without double ownership or false synchronization assumptions.
- Choose between a Sonar-native dependency-risk model and an imported external report based on inventory, SBOM, policy, and licensing needs.
- Document false-positive and acceptance decisions in the system that actually owns the underlying rule/risk.
1. Design principle: one dashboard does not mean one source of truth
SonarQube can consolidate first-party code findings and external issues, but a consolidated view does not erase provenance. Every security signal needs an explicit producer, owning policy, remediation system, and verification system. Otherwise teams eventually mark an issue fixed in one interface while the source tool, credential provider, or package inventory still says otherwise.
2. Basic versus expanded versus custom secret detection
| Need | Approach | Trade-off |
|---|---|---|
| Catch common hard-coded credentials in a free local workflow | Community Build secret rules + controlled text scope | Low operational cost; intentionally bounded rule coverage. |
| Broader service-specific secret signatures | Commercial Server secret capability where supported | More coverage; edition/license and analyzer-version dependence. |
| Company-specific proprietary token format | Enterprise custom secret pattern or dedicated secret-scanning tool | Custom rules require ownership, regex quality, false-positive tuning, and governance. |
| Prevent/use/revoke credentials | Vault/secret manager/IAM/CI secret store | Not a static-analysis function; must integrate with engineering workflows. |
3. Sonar-native SCA versus external SCA/SBOM
Current SonarQube Advanced Security SCA is a Server add-on starting in Enterprise edition. It can provide native dependency inventory/risk workflows and SBOM-related capabilities. An external SCA tool may provide equivalent or different capabilities and can export issues into SonarQube. Neither choice is automatically “better”; the deciding factors are evidence requirements.
| Requirement | Native Advanced Security SCA | External SCA + Sonar import |
|---|---|---|
| Direct/transitive inventory | Native when supported and licensed | Owned by external SCA |
| SBOM generation/export | Available in Advanced Security workflows where supported | Owned by external SBOM/SCA tool |
| Sonar quality/security context | Integrated risk model | External issues can appear beside Sonar findings |
| Rule/policy ownership | SonarQube/Advanced Security configuration | External tool remains authoritative |
| Community Build compatibility | No native Advanced Security SCA | Yes, through external report import |
4. Source finding versus credential lifecycle
flowchart TD A[Secret finding] --> B[Preserve location/revision] B --> C[Revoke / rotate at issuer] C --> D[Update legitimate consumers] D --> E[Remove secret from source/history as appropriate] E --> F[Reanalyze] F --> G[Incident/audit closure]
Static-analysis “Fixed” is only one link in this chain. A production runbook should prioritize revocation/rotation when the secret was real and exposed, because removing the string from the next commit does not invalidate a credential already copied elsewhere.
5. Native versus imported finding semantics
Imported external issues can be managed in SonarQube, including status/assignment actions, but those actions do not modify the external tool. This creates an important design choice:
- Single-owner workflow: triage in the external tool and use SonarQube primarily for visibility/gating.
- Dual-view workflow: allow Sonar annotations, but define which system is authoritative and how reconciliation happens.
- Do not pretend synchronization: “False positive in SonarQube” is not automatically “False positive in Bandit/SCA/vendor system.”
6. False-positive handling by provenance
| Finding | Where to correct root cause | Where to preserve audit note |
|---|---|---|
| Native Sonar secret rule is objectively wrong | Sonar issue/rule/profile process, subject to edition/rule controls | Sonar issue history + governance record |
| External SARIF dependency advisory is wrong | External producer/advisory/policy system | External tool first; optional matching Sonar annotation |
| Real credential already revoked but still hard-coded | Source still needs cleanup | Rotation evidence + Sonar remediation |
| Valid dependency risk temporarily accepted | SCA/dependency-risk owner | Owner, expiry, compensating controls, affected release/SBOM |
7. Local versus CI/container report paths
sonar.sarifReportPaths is evaluated where the scanner
runs. A path valid on the host is useless inside a scanner container
unless the report is mounted at the path visible inside that
container. The same principle applies to manifests and lockfiles
used by SCA engines: evidence must exist inside the analysis
workspace that owns the scan.
8. Worked decision table
| Scenario | Choice | Observable justification |
|---|---|---|
| Small open-source project wants free hard-coded-secret checks | Community Build native secret analysis | Active Secrets profile, indexed/text-included files, native issues. |
| Enterprise needs proprietary token signatures | Enterprise custom secret rule or dedicated secret scanner | Edition/license, custom rule source, test corpus, false-positive baseline. |
| Community Build project needs CVE/SBOM evidence | Dedicated SCA/SBOM tool; import selected findings if useful | External inventory/SBOM artifact plus Sonar external issue provenance. |
| Enterprise wants integrated dependency risks and SBOMs | Evaluate SonarQube Advanced Security SCA | Enterprise+add-on license, enabled SCA, supported manifests/build context, Dependencies/SBOM evidence. |
| Same dependency risk appears natively and via SARIF | Choose one authoritative feed; remove duplicate ingestion | Matching component/advisory/rule provenance and before/after issue evidence. |
9. Governance record template
signal_id:
producer: sonar-native | external-sarif | advanced-security-sca | secret-manager
producer_version:
server_edition_version:
source_revision:
manifest_or_file:
rule_or_advisory_id:
classification:
authoritative_system:
remediation_owner:
credential_rotation_required: yes | no | not-applicable
sbom_or_inventory_artifact:
exception_status_and_expiry:
post-remediation_evidence:
limitations:
Knowledge check
Why might a team keep an external SCA even after adopting SonarQube for code quality?
Because Community Build does not supply native Advanced Security SCA, and even commercial choices depend on required inventory, SBOM, license, ecosystem, and workflow capabilities.
What is the most dangerous confusion after a real secret finding is fixed in source?
Assuming source cleanup means the credential is revoked. The issuer/secret manager must prove revocation or rotation.
Can SonarQube quality profiles activate an imported SARIF rule?
No. External rules are governed by their producer, not Sonar quality profiles.
What does an SBOM add beyond a single dependency issue?
A release-linked component inventory/provenance artifact. A single imported issue cannot substitute for that inventory.
When should duplicate native/imported signals be kept deliberately?
Only when the two systems provide intentionally different evidence and the governance model explains how duplication is reconciled; otherwise choose an authoritative feed.
Official references and version notes
- SonarQube downloads / feature comparison — current Community Build 26.9.0.129388; basic secret detection in Community Build; broader commercial secret/security features.
- Community Build — Secrets — secret scope, text inclusions, file processing, and Community limitation on custom patterns.
- SonarQube Server — Secrets — current server secret configuration and custom secret-pattern behavior; custom patterns start in Enterprise edition.
- About external issues — imported-rule ownership and the fact that Sonar issue workflow changes do not update the external producer.
-
SARIF reports
— SARIF 2.1.0 requirements and
sonar.sarifReportPaths. - SonarQube Advanced Security — Enterprise-edition-and-above add-on boundary.
- Analyzing projects for dependencies (SCA) — native dependency-risk analysis prerequisites, build-environment implications, and licensing.
- Viewing dependencies / SBOM — native dependency inventory and SBOM evidence when Advanced Security is licensed.
- SonarScanner CLI 8.1.0.6389 — scanner baseline used by the local path.
Rechecked 2026-09-08. Mandatory examples target SonarQube Community Build 26.9.0.129388 and SonarScanner CLI 8.1.0.6389. Commercial reference streams are SonarQube Server 2026 Release 4.1 and 2026.1.5 LTA. Community Build currently provides basic secrets detection and SARIF/generic external-issue import. Current product packaging expands secret coverage in commercial Server editions, while organization-specific custom secret patterns start in Enterprise edition. SonarQube Advanced Security SCA is a Server add-on starting in Enterprise edition; native dependency inventory/risk/SBOM evidence must not be claimed on Community Build merely because a manifest exists or a SARIF dependency issue was imported. Recheck secret rules, text inclusion defaults, external-report schema, supported package managers/languages, and license entitlements before automating another release.
SonarQube product names, editions, release trains, scanner runtimes, APIs, authentication options, and platform prerequisites can change independently. Re-check the linked SonarSource primary documentation for the exact target release before applying version-sensitive commands or operational guidance outside the disposable course environment.
Keep the academy open
Support free, practical DevOps education.
Every lesson is designed to remain readable in a browser, downloadable from GitHub, and usable without a paid learning platform. Contributions help expand and maintain the curriculum.
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0Send only Ethereum/ERC-20 compatible assets to this
address.