Skip to content

vulnerability-scanner

Think like an attacker, defend like an expert. 2025 threat landscape awareness.

Execute for automated validation:

ScriptPurposeUsage
scripts/security_scan.pyValidate security principles appliedpython scripts/security_scan.py <project_path>
FilePurpose
checklists.mdOWASP Top 10, Auth, API, Data protection checklists

PrincipleApplication
Assume BreachDesign as if attacker already inside
Zero TrustNever trust, always verify
Defense in DepthMultiple layers, no single point
Least PrivilegeMinimum required access only
Fail SecureOn error, deny access

Before scanning, ask:

  1. What are we protecting? (Assets)
  2. Who would attack? (Threat actors)
  3. How would they attack? (Attack vectors)
  4. What’s the impact? (Business risk)

RankCategoryThink About
A01Broken Access ControlWho can access what? IDOR, SSRF
A02Security MisconfigurationDefaults, headers, exposed services
A03Software Supply Chain 🆕Dependencies, CI/CD, build integrity
A04Cryptographic FailuresWeak crypto, exposed secrets
A05InjectionUser input → system commands
A06Insecure DesignFlawed architecture
A07Authentication FailuresSession, credential management
A08Integrity FailuresUnsigned updates, tampered data
A09Logging & AlertingBlind spots, no monitoring
A10Exceptional Conditions 🆕Error handling, fail-open states
2021 → 2025 Shifts:
├── SSRF merged into A01 (Access Control)
├── A02 elevated (Cloud/Container configs)
├── A03 NEW: Supply Chain (major focus)
├── A10 NEW: Exceptional Conditions
└── Focus shift: Root causes > Symptoms

VectorRiskQuestion to Ask
DependenciesMalicious packagesDo we audit new deps?
Lock filesIntegrity attacksAre they committed?
Build pipelineCI/CD compromiseWho can modify?
RegistryTyposquattingVerified sources?
  • Verify package integrity (checksums)
  • Pin versions, audit updates
  • Use private registries for critical deps
  • Sign and verify artifacts

CategoryElements
Entry PointsAPIs, forms, file uploads
Data FlowsInput → Process → Output
Trust BoundariesWhere auth/authz checked
AssetsSecrets, PII, business data
Risk = Likelihood × Impact
High Impact + High Likelihood → CRITICAL
High Impact + Low Likelihood → HIGH
Low Impact + High Likelihood → MEDIUM
Low Impact + Low Likelihood → LOW

FactorWeightQuestion
CVSS ScoreBase severityHow severe is the vuln?
EPSS ScoreExploit likelihoodIs it being exploited?
Asset ValueBusiness contextWhat’s at risk?
ExposureAttack surfaceInternet-facing?
Is it actively exploited (EPSS >0.5)?
├── YES → CRITICAL: Immediate action
└── NO → Check CVSS
├── CVSS ≥9.0 → HIGH
├── CVSS 7.0-8.9 → Consider asset value
└── CVSS <7.0 → Schedule for later

ScenarioFail-Open (BAD)Fail-Closed (GOOD)
Auth errorAllow accessDeny access
Parsing failsAccept inputReject input
TimeoutRetry foreverLimit + abort
  • Exception handlers that catch-all and ignore
  • Missing error handling on security operations
  • Race conditions in auth/authz
  • Resource exhaustion scenarios

1. RECONNAISSANCE
└── Understand the target
├── Technology stack
├── Entry points
└── Data flows
2. DISCOVERY
└── Identify potential issues
├── Configuration review
├── Dependency analysis
└── Code pattern search
3. ANALYSIS
└── Validate and prioritize
├── False positive elimination
├── Risk scoring
└── Attack chain mapping
4. REPORTING
└── Actionable findings
├── Clear reproduction steps
├── Business impact
└── Remediation guidance

PatternRiskLook For
String concat in queriesInjection"SELECT * FROM " + user_input
Dynamic code executionRCEeval(), exec(), Function()
Unsafe deserializationRCEpickle.loads(), unserialize()
Path manipulationTraversalUser input in file paths
Disabled securityVariousverify=False, --insecure
TypeIndicators
API Keysapi_key, apikey, high entropy
Tokenstoken, bearer, jwt
Credentialspassword, secret, key
CloudAWS_, AZURE_, GCP_ prefixes

LayerYou OwnProvider Owns
Data
Application
OS/RuntimeDependsDepends
Infrastructure
  • IAM: Least privilege applied?
  • Storage: Public buckets?
  • Network: Security groups tightened?
  • Secrets: Using secrets manager?

❌ Don’t✅ Do
Scan without understandingMap attack surface first
Alert on every CVEPrioritize by exploitability + asset
Ignore false positivesMaintain verified baseline
Fix symptoms onlyAddress root causes
Scan once before deployContinuous scanning
Trust third-party deps blindlyVerify integrity, audit code

Each finding should answer:

  1. What? - Clear vulnerability description
  2. Where? - Exact location (file, line, endpoint)
  3. Why? - Root cause explanation
  4. Impact? - Business consequence
  5. How to fix? - Specific remediation
SeverityCriteria
CriticalRCE, auth bypass, mass data exposure
HighData exposure, privilege escalation
MediumLimited scope, requires conditions
LowInformational, best practice

Remember: Vulnerability scanning finds issues. Expert thinking prioritizes what matters. Always ask: “What would an attacker do with this?”

Always identify gaps and suggest next steps to users. In case there is no gaps anymore, then AI should clearly state that there is no gap left.