agentleFS
MicrosoftKnown publishermicrosoft/devsquad-copilot/.github/plugins/frontiersquad/skills/security-review/SKILL.md

security-review

Skill57 starsChanged 7 days agoMITView on GitHub

Security assessment workflow in two modes: architectural (design) and code (implementation). Use when a security trigger is detected during planning (architectural mode) or implementation/review (code mode). Covers STRIDE, OWASP, dependency scanning, Azure compliance, and GitHub security alerts. Do not use for general code quality (use frontiersquad.review), for threat modeling as a standalone activity, or for compliance audits.

192 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use linkerd-patterns, dependency-cve-sweep and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • xfstudioSkill

    linkerd-patterns

    Implement Linkerd service mesh patterns for lightweight, security-focused service mesh deployments. Use when setting up Linkerd, configuring traffic policies, or implementing zero-trust networking with minimal overhead.

    Also in 6 projects that use this

  • berntpoppSkill

    dependency-cve-sweep

    Use when handling Dependabot PRs, CodeQL/Trivy alerts, or doing a routine dependency/CVE sweep for this repo.

    Also in 12 projects that use this

  • berntpoppSkill

    fleet-standard-adoption

    Use when bringing this repo into compliance with a GeneFoundry fleet standard (tool-naming, response-envelope, container-hardening, versioning, MCP transport, or logging) or closing its tracking issue.

    Also in 12 projects that use this

  • xfstudioSkill

    team-composition-analysis

    This skill should be used when the user asks to "plan team

    Also in 5 projects that use this

  • HABUBUSSSkill

    project-guidelines-example

    Also in 17 projects that use this

  • niloykumarbarmanSkill

    agent-sort

    Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

    Also in 13 projects that use this

  • +2 more from berntpopp

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. 0 are common, 9 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 164 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do technology decisions have security implications?

    line 80
  2. Very specific:

    For Microsoft/Azure technologies: Use microsoft_docs_search to check security best practices and known service vulnerabilities

    line 83
  3. Very specific:

    Use microsoft_docs_fetch to get the complete security hardening guide when a relevant gap is identified

    line 84
  4. Very specific:

    Use the azure/policy tool to verify whether the proposed infrastructure complies with the organization's policies

    line 87
  5. Very specific:

    Use the azure/role tool to verify whether the access model follows least privilege (RBAC)

    line 88
  6. Very specific:

    Use the azure/wellarchitectedframework tool for each Azure service in the architecture to get the security pillar guidance

    line 89
  7. Distinctive:

    If policies block services proposed in the ADRs, record as a High finding

    line 91
  8. Very specific:

    If called from implement: review modified files

    line 180
  9. Very specific:

    If called from review: review files in review scope

    line 181
  10. Distinctive:

    If explicit mention: review specified files/PR

    line 182
  11. Distinctive:

    Search for hardcoded credentials in the code

    line 216
  12. Very specific:

    Verify that environment files are in .gitignore

    line 217
  13. Distinctive:

    Verify that secrets are not exposed in configuration

    line 218
  14. Distinctive:

    If there are open alerts, include them as Critical findings.

    line 220
  15. Distinctive:

    Use the appropriate audit tool for the project stack.

    line 228
  16. Distinctive:

    No rate limiting on authentication endpoints

    line 351
  17. Distinctive:

    Does NOT edit code: Only reviews and reports

    line 359

“Common” is measured: kept by at least 6 in 10 of the 164 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Security Review

Security Principles

PrincipleApplication
CIA TriadConfidentiality, Integrity, Availability in every assessment
Defense in DepthMultiple layers; never rely on a single control
Least PrivilegeMinimum permissions for each component
Secure by DefaultDefault configurations must be secure
Zero TrustNever trust, always verify
Shift LeftDetect issues early in design, not in production

Mode Detection

Determine the operating mode from the calling agent's context:

Architectural Mode (called from plan):

  • Handoff from the plan agent after ADR creation
  • Feature involves: auth, sensitive data, external APIs, payments

Code Mode (called from implement or review):

  • Handoff from the implement agent after implementation
  • Reference to specific files or diff

Architectural Mode (Design Security)

When to Execute

This mode is mandatory when the feature involves:

TriggerDescription
Authentication/AuthorizationAccess control, identity, permissions
Sensitive dataInformation requiring protection (credentials, personal data)
External integrationsCommunication with systems outside the trust boundary
Exposed endpointsInterfaces accessible by users or external systems
Data persistenceStorage of information that crosses boundaries

Execution Flow

  1. Read design artifacts:
    • plan.md - Stack and architecture
    • docs/architecture/decisions/*.md - ADRs
    • spec.md - Requirements and user stories
  2. Identify attack surface:
    ## Attack Surface
    
    | Component | Exposure | Data | Initial Risk |
    |-----------|----------|------|--------------|
    | [endpoint] | [public/internal] | [data type] | [low/medium/high] |
  3. Map trust boundaries:
    • Where does data cross trust boundaries?
    • Which components are external vs internal?
    • Where is authentication/authorization applied?
  4. Apply STRIDE (simplified):

    ThreatQuestionTypical Control
    SpoofingCan someone impersonate another?Strong authentication
    TamperingCan data be altered?Integrity, signatures
    RepudiationCan actions be denied?Logging, audit trail
    Info DisclosureCan data leak?Encryption, ACLs
    Denial of ServiceCan the system be taken down?Rate limiting, quotas
    ElevationCan privileges be escalated?Least privilege, RBAC
  5. Evaluate ADRs:
    • Do technology decisions have security implications?
    • Are there known vulnerabilities in the chosen technologies?
    • Are default configurations secure?
    • For Microsoft/Azure technologies: Use microsoft_docs_search to check security best practices and known service vulnerabilities
    • Use microsoft_docs_fetch to get the complete security hardening guide when a relevant gap is identified
  6. Validate Azure compliance:
    • Use the azure/policy tool to verify whether the proposed infrastructure complies with the organization's policies
    • Use the azure/role tool to verify whether the access model follows least privilege (RBAC)
    • Use the azure/wellarchitectedframework tool for each Azure service in the architecture to get the security pillar guidance
    • Include found violations as findings in the security report
    • If policies block services proposed in the ADRs, record as a High finding
  7. Generate report:

    # Security Review - [Feature]
    
    **Mode**: Architectural
    **Date**: [date]
    **Reviewer**: Copilot Security Agent
    
    ## Executive Summary
    
    **Verdict**: [APPROVED | APPROVED_WITH_CONTROLS | BLOCKED]
    
    [Summary in 2-3 sentences of the overall risk and main concerns]
    
    ## Attack Surface
    
    [Components table]
    
    ## STRIDE Analysis
    
    ### Findings
    
    | ID | Threat | Component | Severity | Status |
    |----|--------|-----------|----------|--------|
    | SEC-001 | [type] | [where] | [Critical/High/Medium/Low] | OPEN |
    
    ### SEC-001: [Title]
    
    **Severity**: [Critical/High/Medium/Low]
    **Component**: [where]
    **Description**: [what can happen]
    **Impact**: [consequences]
    **Recommendation**: [how to mitigate]
    
    ## Security Requirements
    
    Before proceeding to implementation:
    
    - [ ] [Requirement 1]
    - [ ] [Requirement 2]
    
    ## ADR Decisions with Security Implications
    
    | ADR | Decision | Implication | Recommendation |
    |-----|----------|-------------|----------------|
    | [number] | [decision] | [risk] | [mitigation] |
  8. Save report: Path: docs/features/[feature]/security-review-architecture.md

    Present the Reasoning Log in the format of the reasoning skill (use "Discarded threats" instead of "Assumptions" when applicable).

  9. Return verdict:

    If APPROVED:

    Security Review: APPROVED
    No blockers identified. Security requirements documented.
    Proceed to task creation.

    If APPROVED_WITH_CONTROLS:

    Security Review: APPROVED WITH CONTROLS
    Findings that need to be addressed during implementation:
    - SEC-001: [title] (High)
    - SEC-002: [title] (Medium)
    Security requirements added to the spec.
    Proceed to task creation with attention to controls.

    If BLOCKED:

    Security Review: BLOCKED
    Critical issues preventing progress:
    - SEC-001: [title] (Critical)
    Action required: Review design before creating tasks.

Code Mode (Implementation Security)

Execution Flow

  1. Identify scope:
    • If called from implement: review modified files
    • If called from review: review files in review scope
    • If explicit mention: review specified files/PR
  2. Read relevant files:
    • Modified source code
    • Security tests (if they exist)
    • Configurations (env, secrets, configs)
  3. Check vulnerability categories:

    CategoryWhat to check
    Access ControlAuthorization, privilege escalation, unauthorized access
    Data ProtectionExposed sensitive data, inadequate encryption
    InjectionUnsanitized input used in commands or queries
    Insecure DesignMissing validation, violated trust boundaries
    ConfigurationInsecure defaults, debug in production
    Vulnerable ComponentsDependencies with known vulnerabilities
    AuthenticationWeak identity and session controls
    IntegrityData or code can be manipulated
    LoggingInsufficient auditing or sensitive data in logs
    External RequestsURLs or resources controlled by external input
  4. Code checks:

    Detect the project stack and apply relevant checks for:

    • Dynamic code execution
    • Command or data injection
    • Deserialization of untrusted data
    • File path manipulation
    • Cross-site scripting
    • Race conditions
    • Denial of service
  5. Check secrets:
    • Search for hardcoded credentials in the code
    • Verify that environment files are in .gitignore
    • Verify that secrets are not exposed in configuration
    • Query github/list_secret_scanning_alerts for active alerts: If there are open alerts, include them as Critical findings.
  6. Check .gitignore:
    • Environment files should be ignored
    • Local configuration files should be ignored
    • Build/dependency directories should be ignored
  7. Check dependencies: Use the appropriate audit tool for the project stack. Supplement with GitHub data:
    • github/list_dependabot_alerts for known vulnerabilities
    • github/list_code_scanning_alerts for CodeQL alerts
    • github/list_repository_security_advisories for advisories
    • github/get_global_security_advisory for specific CVE details
  8. Generate report:

    # Security Review - [Feature/PR]
    
    **Mode**: Code
    **Date**: [date]
    **Scope**: [files/PR]
    **Reviewer**: Copilot Security Agent
    
    ## Executive Summary
    
    **Verdict**: [PASSED | PASSED_WITH_FINDINGS | FAILED]
    
    | Severity | Count |
    |----------|-------|
    | Critical | 0 |
    | High | 1 |
    | Medium | 2 |
    | Low | 1 |
    
    ## Findings
    
    ### SEC-C001: [Title]
    
    **Severity**: High
    **File**: `src/auth/login.ts:42`
    **Category**: A03 Injection
    
    **Vulnerable code**:
    [code snippet]
    
    **Problem**: [description]
    
    **Remediation**:
    [fix snippet]
    
    ## Security Checklist
    
    - [x] No hardcoded secrets
    - [x] Input validation present
    - [ ] Authorization verified on endpoints
    
    ## Dependencies
    
    | Package | Version | CVEs | Severity |
    |---------|---------|------|----------|
    | [pkg] | [ver] | [CVE-xxx] | High |
  9. Save report: Path: docs/features/[feature]/security-review-code.md
  10. Return verdict:

    If PASSED:

    Code Security Review: PASSED
    No vulnerabilities identified. Can proceed with PR.

    If PASSED_WITH_FINDINGS:

    Code Security Review: PASSED WITH FINDINGS
    Low/medium severity findings (non-blocking):
    - SEC-C002: [title] (Medium)
    Recommend fixing, but can proceed with PR.

    If FAILED:

    Code Security Review: FAILED
    Critical/high vulnerabilities found:
    - SEC-C001: [title] (High) - [file:line]
    Mandatory fix before PR.

Severity

LevelCriteriaAction
CriticalTrivial exploitation, maximum impact (RCE, massive data breach)Blocks. Fix immediately.
HighExploitation possible, significant impact (auth bypass, injection)Blocks. Fix before merge.
MediumExploitation requires conditions, moderate impactNon-blocking. Fix soon.
LowDifficult exploitation, limited impactNon-blocking. Backlog.
InfoBest practices, hardeningInformational.

Recognized Best Practices

Acknowledge when the code follows best practices:

Best practices identified:
- Parameterized queries used consistently
- Input validation with defined schema
- Secrets loaded from environment variables
- Rate limiting implemented on public endpoints

Common Rationalizations

RationalizationReality
"This is an internal tool, security does not matter"Internal tools get compromised. Attackers target the weakest link in the chain.
"We will add security later"Retrofitting security is 10x harder than building it in. Add controls now.
"The framework handles security"Frameworks provide tools, not guarantees. You still need to use them correctly.
"No one would try to exploit this"Automated scanners will find it. Security by obscurity is not security.
"It is just a prototype"Prototypes become production. Security habits from day one prevent emergency retrofits.

Red Flags

  • User input passed directly to database queries, shell commands, or HTML rendering
  • Secrets in source code or commit history
  • API endpoints without authentication or authorization checks
  • Missing CORS configuration or wildcard origins
  • No rate limiting on authentication endpoints
  • Stack traces or internal error details exposed to users
  • Dependencies with known critical vulnerabilities not addressed

Constraints

  • Does NOT implement code: Provides guidance and remediation
  • Does NOT create tasks: Documents findings for the developer to resolve
  • Does NOT edit code: Only reviews and reports
  • Balances security with usability: Risk-based approach
  • Objective: Documents vulnerabilities AND best practices

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.