Sc recon

From ersinkoc/security-check · View interactive version

Sc recon is an AI agent skill from the GitHub repository ersinkoc/security-check. Codebase discovery and architecture mapping for security analysis

How to use this skill

Skill file

SC: Reconnaissance — Codebase Discovery & Architecture Mapping

Purpose

The reconnaissance skill is the foundation of the entire security-check pipeline. It maps the codebase architecture, identifies all technologies in use, traces data flow paths, and catalogs entry points and trust boundaries. Its output determines which subsequent skills are activated and provides critical context for accurate vulnerability detection.

Activation

First skill executed in Phase 1 of the pipeline. Runs before all other skills.

Output

Files:

Follow the evidence contract in sc-orchestrator. Reconnaissance must make coverage and unknowns explicit; an architecture summary alone is not evidence that a boundary was reviewed.

Discovery Process

1. Technology Stack Detection

Identify all technologies by examining:

Languages:

Frameworks:

Build Tools & Package Managers:

Databases:

2. Application Type Classification

Determine the application type based on detected patterns:

| Type | Indicators |

|------|-----------|

| Web Application | HTML templates, static assets, frontend framework, server-side rendering |

| REST API | Route definitions, JSON response handlers, OpenAPI/Swagger spec |

| GraphQL API | Schema definitions (.graphql), resolvers, Apollo/Yoga config |

| gRPC Service | .proto files, gRPC server setup |

| CLI Tool | Argument parsers (cobra, click, yargs), main entry without HTTP server |

| Library/Package | Public API exports, no main entry, published package config |

| Microservice | Small scope, message queue consumers, service mesh config |

| Monolith | Large codebase, multiple domains, shared database |

| Serverless | Lambda handlers, serverless.yml, CloudFormation templates |

| Desktop App | Electron, Tauri, .NET MAUI, WPF references |

3. Entry Points Mapping

Catalog all entry points where external input enters the system:

HTTP Routes:

CLI Commands:

Message Consumers:

Scheduled Tasks:

WebSocket Endpoints:

File Watchers / Event Handlers:

4. Data Flow Map

Trace the path of user input through the system:

Source identification — where external data enters:

Processing identification — how data is transformed:

Sink identification — where data is consumed in security-sensitive operations:

5. Trust Boundaries

Identify security control points:

Authentication:

Rate Limiting:

Input Validation:

CSRF Protection:

CORS Configuration:

6. External Integrations

Map all external service connections:

7. Authentication Architecture

Determine the authentication model:

| Pattern | Indicators |

|---------|-----------|

| Session-based | Session middleware, cookie config, session store |

| JWT | JWT library imports, token sign/verify calls |

| OAuth 2.0 | OAuth provider config, callback handlers, token exchange |

| API Key | Header/query param key extraction, key validation |

| mTLS | Certificate loading, TLS client auth config |

| Basic Auth | Base64 credential parsing, WWW-Authenticate header |

| SSO/SAML | SAML assertion processing, IdP configuration |

Document:

8. File Structure Analysis

Identify security-sensitive files and paths:

Configuration files:

Sensitive paths:

Deployment files:

9. Detected Security Controls

Catalog existing security measures:

10. Language Detection Summary

Produce a definitive list of detected languages that determines which sc-lang-* skills run in Phase 2:

## Detected Languages
- Go (45% of codebase) → activates sc-lang-go
- TypeScript (35% of codebase) → activates sc-lang-typescript
- Python (20% of codebase, scripts/tools only) → activates sc-lang-python

11. Modern Surface Detection

Activate specialized skills from source-visible boundaries, not dependency names alone:

12. Coverage Ledger

Before hunting, create one stable row per material entry surface, trust boundary, subsystem, and applicable attack class. Each row includes starting paths, status, evidence, and any gap. Seed excluded and unavailable work as out_of_scope, deferred, or blocked rather than silently omitting it.

Use stable, source-derived coverage IDs. Do not include line numbers, wave numbers, agents, verdicts, or severities in identity. Carry prior units forward visibly and revalidate any changed source or condition.

Output Format

The output file security-report/architecture.md must contain all 12 sections above with concrete source facts specific to the scanned codebase. Each section should include repository-relative paths and line references where applicable. The ledger is the authoritative coverage claim; the architecture file summarizes it.

Common Challenges

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.