mcpField
B
baseline-security-audit

baseline-security-audit

github.com/enigmatrySecurity261 installsUpdated 1w ago
Repository

About baseline-security-audit

Baseline Security Audit Skill reviews a codebase for common vulnerabilities and configuration gaps, for teams conducting baseline security reviews and remediation tracking. It covers 19 check areas, rates findings by impact and exploitability, and can create Jira stories after user confirmation.

Key features

  1. 01Check secrets, dependencies, and supply-chain controls
  2. 02Review injection, authorization, and input/output handling
  3. 03Inspect logging, cryptography, TLS, and security headers
  4. 04Rate findings on a consistent severity scale
  5. 05Create Jira stories after user confirmation

Use cases

  1. 01Run a baseline security audit on a codebase
  2. 02Select specific security checks to perform
  3. 03Track confirmed findings as Jira stories

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/enigmatry/agent-skills --skill baseline-security-audit

After installing, type/baseline-security-auditin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
authentication_security.md
code_minification.md
code_quality.md
cookie_storage_security.md
cryptography_security.md
data_minimization.md
database_field_encryption.md
exception_handling.md
http_verb_whitelisting.md
idor.md
input_validation.md
logging.md
output_encoding.md
packages.md
secrets.md
security_headers.md
sensitive_query_strings.md
sql_injection.md
ssl_tls_configuration.md

Details

From the project README

Baseline Security Audit Skill

Overview

This skill performs a comprehensive baseline security audit of the codebase by analyzing common security vulnerabilities and misconfigurations. It can create Jira stories for selected findings after user confirmation for tracking and remediation.

What This Skill Does

This skill performs the following security checks (each with detailed guidance in the references folder):

  1. Secrets and Credentials - Scans for hardcoded secrets, credentials and API keys, and verifies that credentials differ per environment

  2. Package Security - Checks for dependencies with known vulnerabilities, end-of-life runtimes and supply-chain controls

  3. SQL Injection - Identifies SQL injection vulnerabilities in database queries

  4. Exception Handling - Reviews error handling to keep exception details out of responses while logging them

  5. Logging Security - Validates log sinks, levels, audit separation and the absence of secrets and PII in logs

  6. Sensitive Query Strings - Checks for sensitive data in URL query parameters and in URL logging

  7. IDOR (Insecure Direct Object References) - Analyzes object-level and function-level authorization checks

  8. Output Encoding - Validates encoding and sanitization to prevent XSS

  9. Input Validation - Ensures user input is validated server-side, including mass assignment and path traversal

  10. Code Minification - Verifies production builds do not expose source maps or debug code

  11. Data Minimization - Identifies unnecessary exposure of data through APIs and the frontend, and unnecessary storage of sensitive data (GDPR)

  12. Cookie and Storage Security - Validates cookie flags and browser storage of sensitive data

  13. Cryptography Security - Ensures strong algorithms, key management and password hashing

  14. Security Headers - Checks response security headers (CSP, HSTS, Permissions-Policy and others) and removal of version-disclosing headers

  15. HTTP Verb Whitelisting - Ensures only the HTTP verbs the application uses are allowed

  16. SSL/TLS Configuration - Validates TLS protocols, cipher suites, certificates and code-level TLS settings

  17. Database Field Encryption - Verifies that sensitive columns are encrypted at the column or application level

  18. Code Quality - Reviews build warnings, security analyzers and SonarQube security ratings

  19. Authentication Security - Verifies OpenID Connect with Authorization Code + PKCE, authorization by default, Swagger restricted to Development, and token lifetime and password policy

Each check provides:

  • Specific patterns to search for
  • RED FLAGS to identify
  • Findings rated on the single severity scale below
  • Remediation guidance
  • Code examples

Severity Scale

Every reference file rates findings on this one scale. Rate by impact and exploitability, never by who supplies the input or which environment is affected: admin-supplied input does not lower a finding below Medium, and any cross-tenant or cross-user impact is at least High.

SeverityDefinitionTypical examples
CriticalExploitable now, from unauthenticated or low-privilege input, with severe impactSecret or credential in source, config or logs; injection reachable from user input; authentication bypass; CVSS 9.0+; CVV or PAN stored in clear; broken or home-made crypto protecting secrets
HighExploitable with authenticated input, or exposes sensitive data, or a core control is missingMissing authorization on an endpoint; stack traces or exception details in HTTP responses; TLS 1.0/1.1 enabled; no HSTS; unauthenticated CBC data handed to clients; CVSS 7.0–8.9; PII or special-category data logged as payload; runtime past end of life
MediumDefense-in-depth gap or misconfiguration that needs another weakness to exploitMissing security header; security analyzers not enabled; unreviewed SonarQube security issues; CVSS 4.0–6.9; verbose logging in production; no automated certificate renewal
LowHygiene or informational; no realistic exploit path on its ownSameSite not explicit; HSTS preload absent; public identifiers shared across environments; post-quantum readiness; documentation gaps; CVSS below 4.0

Status words such as SECURE / PARTIALLY SECURE / INSECURE, IMPLEMENTED / PARTIAL / NOT, or EXCESSIVE / MODERATE / MINIMAL are not severities; when a reference file uses them for an assessment, every reported finding still carries one of the four severities above.

Report every finding with: Severity · Check number and name · Location (file:line, header, or live URL) · What was found · Remediation · OWASP Top 10:2025 category (from the mapping below).

Standards Mapping

Tag each finding with the OWASP Top 10:2025 category and ASVS 5.0 chapter of its check.

#CheckOWASP Top 10:2025ASVS 5.0
1Secrets and CredentialsA02 Security MisconfigurationV13 Configuration
2Package SecurityA03 Software Supply Chain FailuresV15 Secure Coding and Architecture
3SQL InjectionA05 InjectionV1 Encoding and Sanitization
4Exception HandlingA10 Mishandling of Exceptional ConditionsV16 Security Logging and Error Handling
5Logging SecurityA09 Security Logging and Alerting FailuresV16 Security Logging and Error Handling, V14 Data Protection
6Sensitive Query StringsA04 Cryptographic Failures (data exposure)V14 Data Protection
7IDOR (Insecure Direct Object References)A01 Broken Access ControlV8 Authorization
8Output EncodingA05 InjectionV1 Encoding and Sanitization, V3 Web Frontend Security
9Input ValidationA05 Injection, A06 Insecure DesignV2 Validation and Business Logic
10Code MinificationA02 Security MisconfigurationV13 Configuration, V3 Web Frontend Security
11Data MinimizationA04 Cryptographic Failures, A06 Insecure DesignV14 Data Protection
12Cookie and Storage SecurityA02 Security Misconfiguration, A07 Authentication FailuresV7 Session Management, V3 Web Frontend Security
13Cryptography SecurityA04 Cryptographic FailuresV11 Cryptography
14Security HeadersA02 Security MisconfigurationV3 Web Frontend Security, V13 Configuration
15HTTP Verb WhitelistingA02 Security MisconfigurationV4 API and Web Service, V13 Configuration
16SSL/TLS ConfigurationA04 Cryptographic Failures, A02 Security MisconfigurationV12 Secure Communication
17Database Field EncryptionA04 Cryptographic FailuresV14 Data Protection, V11 Cryptography
18Code QualityA03 Software Supply Chain Failures, A06 Insecure DesignV15 Secure Coding and Architecture
19Authentication SecurityA07 Authentication Failures, A01 Broken Access ControlV6 Authentication, V8 Authorization, V10 OAuth and OIDC

Sources: https://owasp.org/Top10/2025/ , https://github.com/OWASP/ASVS/tree/v5.0.0

How to Use

Invoke this skill by asking for a security audit:

  • "Perform a baseline security audit"
  • "Check the codebase for security issues"
  • "Run security checks on this project"

Execution Flow

Step 0 — Select Checks to Run (ask once, at the very start)

Before doing anything else, present the full list of available checks and ask the user which ones to run:

"Which security checks would you like to run?

#Check
1Secrets and Credentials
2Package Security
3SQL Injection
4Exception Handling
5Logging Security
6Sensitive Query Strings
7IDOR (Insecure Direct Object References)
8Output Encoding
9Input Validation
10Code Minification
11Data Minimization
12Cookie and Storage Security
13Cryptography Security
14Security Headers
15HTTP Verb Whitelisting
16SSL/TLS Configuration
17Database Field Encryption
18Code Quality
19Authentication Security

Reply with all to run all checks, or provide a comma-separated list of numbers (e.g. 1, 3, 5) to run a specific subset."

Store the selected check numbers as SELECTED_CHECKS. Only run, report on, and create Jira stories for the selected checks. Do not ask again during the audit.

If SELECTED_CHECKS includes 14 (Security Headers) or 16 (SSL/TLS Configuration) — or if all was selected — ask the user for the production URL immediately after the check selection:

"Checks 14 and/or 16 require a live URL. What is the production URL? (leave blank to skip live inspection and fall back to static analysis)"

Store the answer as PRODUCTION_URL. If the user leaves it blank, set PRODUCTION_URL to empty and proceed with static analysis for both checks. Do not ask for this URL again during the audit.

Step 0b — Determine the Hosting Model (once, before running checks)

Checks 10, 12, 14, 15 and 16 depend on where the application runs, because web.config is only honoured by IIS and Azure App Service on Windows. Determine HOSTING_MODEL from repository evidence before running them; ask the user once only if the evidence is contradictory or absent.

HOSTING_MODELEvidenceEffect on checks
iisweb.config with <aspNetCore> or <system.webServer>, Bicep Microsoft.Web/sites without linuxFxVersion, pipeline deploying to IIS or Windows App Serviceweb.config sections (customHeaders, requestFiltering, removeServerHeader, httpErrors) apply
linuxDockerfile, Bicep linuxFxVersion, kind: 'app,linux', AKS or Container Apps manifests, Kestrel exposed directlyweb.config is ignored; the equivalents are middleware (UseHsts, security-header middleware, method filtering) and container or platform settings. Do not report missing web.config entries
edge (modifier, combined with either)Bicep Microsoft.Cdn/profiles (Front Door), Microsoft.Network/applicationGateways, or a reverse proxy in front of the appHeaders, TLS policy and verb filtering may be set or stripped at the edge; when PRODUCTION_URL is available, the live response is the ground truth, and UseForwardedHeaders must be configured

Store the result as HOSTING_MODEL and do not ask again.

Jira Integration

Step 1 — Collect the Jira Project Code (ask once, at the very start)

After confirming the selected checks, ask the user exactly once:

"What is the Jira project code where security stories should be created? (e.g. SEC, PROJ)"

Store the answer as JIRA_PROJECT_CODE and reuse it for all subsequent story creation calls. Do not ask again during the audit.

Step 2 — Jira Priority Mapping

All findings already carry one of the four severities from the Severity Scale section. Map them to Jira priorities as follows (verify the priority names against the target Jira project's scheme; some schemes use Medium instead of Normal):

SeverityJira Priority
CriticalHighest
HighHigh
MediumNormal
LowLow
Step 3 — Present All Findings and Ask Which to Send to Jira

After all selected checks are complete, output a numbered consolidated table of every finding. Each check covers a distinct topic, so a configuration is reported under exactly one check; if the same file and line surfaces twice, keep the finding under the check whose topic it is and drop the other:

#CheckFindingLocationSeverityOWASP 2025
11 Secrets and CredentialsHardcoded API keysrc/Api/appsettings.json:14CriticalA02
2...............

Then ask the user exactly once:

"Which findings should be created as Jira stories? Reply with all to create stories for all findings, a comma-separated list of numbers (e.g. 1, 3, 5), or none to skip Jira creation."

Do not create any Jira stories before receiving this answer.

Step 4 — Create a Jira Story for Each Selected Finding

Package Security — special consolidation rule: Instead of one story per package, consolidate all npm findings into a single story and all NuGet findings into a single story (at most 2 stories for this check). List every affected package, its current version, recommended version, CVE(s), and risk level in the description of the consolidated story. Apply the highest priority among the individual findings to the consolidated story. If a package ecosystem has no findings, omit its story entirely.

Before the first story, call getAccessibleAtlassianResources once and store the returned cloud id as CLOUD_ID; every Jira call below requires it.

For each finding selected by the user, create one Jira story using the createJiraIssue tool with the following fields:

FieldValue
cloudIdCLOUD_ID
projectKeyJIRA_PROJECT_CODE (collected above)
issueTypeNameStory
summary[Security Audit] <Check Name>: <short finding title>
descriptionFinding location (file + line number), description of the issue, remediation steps, and the line OWASP Top 10:2025: <category> (Markdown)
additional_fields{"labels": ["BaselineSecurity"], "priority": {"name": "<mapped priority>"}} — labels and priority are only accepted through this object

Example summary: [Security Audit] Secrets Management: Hardcoded API key in appsettings.json

After each createJiraIssue call succeeds:

  1. Echo the created story key inline in the audit output, e.g.: (→ created PROJ-42)

  2. Call createIssueLink to relate the new story to the ETL project story for this project:

    • cloudId: CLOUD_ID
    • type: "Relates"
    • inwardIssue: newly created story key (e.g. YES-42)
    • outwardIssue: ETL project story key (e.g. ETL-2879)

    Find the ETL story once, before creating the first link, with searchJiraIssuesUsingJql (cloudId = CLOUD_ID), for example project = ETL AND summary ~ "<current project name>" AND summary ~ "Baseline security". If more than one issue matches or none does, show the candidates and ask the user for the key. Store it as ETL_STORY_KEY and do not search again.

⚠️ Do not use customfield_10014 (Epic Link) for this — that field only accepts Epics. The ETL story is a Story, not an Epic. Use createIssueLink instead.

Step 5 — Final Summary Table

After all selected stories are created, output a consolidated table:

Story KeyCheckSummaryPriority
PROJ-42Secrets ManagementHardcoded API key in appsettings.jsonHigh
............

If the user replied none, skip story creation and omit this table.

Comments

Markdown supported