Chapter 15Lesson 03~120 minutes

Security Hotspots, Vulnerabilities, Taint Analysis, and Review Workflow: Configuration, Design Patterns, and Trade-Offs

Choose security-analysis and review patterns by finding type, language, edition, ownership, and evidence needs instead of treating every security signal as interchangeable.

SecurityVulnerabilitiesHotspot reviewTaint analysisGovernance

Learning objectives

  • Choose the correct remediation/review workflow for vulnerabilities, hotspot-style findings, and taint flows.
  • Compare Community Build with commercial advanced-security boundaries without confusing licensing with security quality.
  • Design ownership and review records that remain auditable through analyzer and hotspot-migration changes.
  • Use severity/impact/rating as prioritization evidence without equating them to exploitability.
  • Select review and exception patterns that are reversible, time-bounded, and tied to source revisions.

1. Design principle: security policy must survive UI and taxonomy changes

The durable policy is not “click Safe in the Hotspots tab.” The durable policy is: identify the exact security-sensitive finding, determine whether remediation or contextual review is required, record the evidence and owner, then prove the next analysis state. That remains valid even while Sonar migrates hotspot objects into the ordinary issue model.

2. Vulnerability versus hotspot-style review

Question Vulnerability/security issue Hotspot-style finding
Default expectation Investigate and remediate the defective security behavior. Review context first; fix if the protection is inadequate.
Primary evidence Rule, location/flow, source revision, remediation diff, reanalysis. Rule risk description, surrounding controls, reviewer rationale, revision, reanalysis/history.
Bad shortcut Lower severity, deactivate rule, or accept without risk rationale. Mark safe only to improve a rating/review percentage.
2026 migration effect Normal issue model remains central. May be represented as a migrated ordinary security issue rather than classic hotspot.

3. Direct pattern matching versus taint/data-flow analysis

Some security rules can decide from local syntax or local semantic context. Others need interprocedural data-flow reasoning. Taint analysis follows a value from a source to a sink and may need to understand sanitizers, control flow, framework APIs, and multiple methods/files.

Data-flow evidence
flowchart LR
  S[Untrusted input / source] --> P1[Assignment / parameter]
  P1 --> P2[Transformation]
  P2 --> Q{Sanitized?}
  Q -->|No| K[Dangerous sink]
  Q -->|Yes| Z[Flow considered protected]

Do not infer that a Community Build rule with one location is “inferior” or that every Developer-edition finding is exploitable. The two analyzers answer different questions. Verify the current supported language/edition matrix and inspect the actual flow evidence.

4. Community Build versus commercial advanced-security capability

Capability Mandatory local path Optional commercial path
Basic vulnerabilities Community Build supports basic vulnerability detection in supported languages. Also available.
Security-sensitive review Community Build product material still includes Security Hotspot review, subject to the 2026 migration to security issues. Also available, with the same migration/version caveat.
Injection/taint analysis Conceptual/manual source→sink simulation only. Developer edition+ currently advertises taint-based injection detection for selected languages.
Data Center HA/scaling Not needed for analysis semantics. Deployment/availability concern, not a different definition of “vulnerable.”

5. Review design patterns

Fix-first

Use when the code is clearly unsafe and remediation is low-risk. Preserve the issue key and source diff.

Context review

Use for hotspot-style findings. Record threat, surrounding controls, decision, reviewer, and revisit trigger.

Temporary acceptance

Use only when current issue workflow supports it and remediation must be deferred. Time-bound it and track compensating control/owner.

False positive

Use only when the analyzer is objectively wrong about the code. This is not a substitute for “risk accepted.”

6. Security rating, hotspot review percentage, and migration

Older/current-overlap releases may expose both security ratings and Security Hotspot review measures. Sonar’s 2026 migration plan states that former hotspot findings will ultimately become ordinary security issues/vulnerabilities and affect the existing security rating, while hotspot-specific measures are being removed. Therefore:

  • Record the exact server/community release and instance mode.
  • Do not compare pre-migration hotspot-review percentages directly with post-migration security ratings as if the metric definition were unchanged.
  • Do not silently edit a gate because migration increases security-issue counts.
  • Document the product migration as a measurement-definition change.

7. Worked decision table

Scenario Best action Evidence
Hard-coded fake secret in a local fixture triggers a security issue Replace it with environment/config injection; reanalyze. Same project/profile, new revision, task, issue fixed/disappeared.
Cookie protection rule is context-dependent Review hotspot-style context; fix missing flags if appropriate. Rule description, deployment context, review rationale, revision.
SQL command constructed from user input; Community Build shows no flow Do not claim safe. Manually document source→sink risk; optionally test on authorized Developer+ instance. Edition matrix, manual flow, optional commercial finding.
Migration turns former hotspots into security issues and gate fails Preserve the old/new metric definitions and triage findings; do not lower the gate reflexively. Version change, rule keys/tags, gate condition history, issue population.

8. Governance record template

finding_key:
rule_key:
representation: vulnerability | classic hotspot | migrated security issue | taint finding
server_version:
instance_mode:
edition:
language/analyzer:
revision:
decision: fixed | contextual-safe | accepted-temporarily | false-positive
evidence:
reviewer:
expiry_or_revisit_trigger:
post_analysis_task:
post_analysis_status:
residual_risk:

Knowledge check

Why should policy say “hotspot-style review” rather than depend only on a Hotspots tab?

Is False positive the correct state for a valid risk the team chooses to defer?

Does a taint flow itself prove exploitability?

Should a gate threshold be lowered automatically after hotspot migration increases security issues?

What makes a security exception auditable?

Next lesson

Diagnose security-analysis failures without hiding evidence

Lesson 4 engineers the realistic failure modes that make security dashboards misleading.

Official references and version notes

Version and compatibility note

Rechecked 2026-09-08. Mandatory examples target SonarQube Community Build 26.9.0.129388 and SonarScanner CLI 8.1.0.6389. Sonar is actively migrating Security Hotspots into ordinary security issues/vulnerabilities during 2026; classic Hotspot UI/API objects may therefore differ by rule and release, and api/hotspots is deprecated from the 2026.4 server line. The course preserves the durable contextual-review concept while requiring learners to inspect the current object representation. Current product material advertises injection-vulnerability taint analysis in Developer edition and above for selected languages (Java, C#, JavaScript/TypeScript, Python, PHP, Kotlin, Go, VB.NET); the mandatory Community Build lab uses a manual source-to-sink fallback and does not emulate commercial analyzers. Recheck rule classification, migration state, instance mode, analyzer version, and edition/language support before applying automation to another release.

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.

Ethereum / ERC-20
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0Send only Ethereum/ERC-20 compatible assets to this address.