Skip to content

ShulkwiSEC/bb-huge / skills/curated/compliance

compliance

Flagged

Full ASVS 5.0 compliance assessment against a codebase and/or architecture diagrams. Reads all 346 controls from the companion CSV, performs targeted code analysis per control, and produces a complete matrix marked COMPLIANT / NON_COMPLIANT / NOT_RELEVANT — with per-control reasoning and evidence (code snippets, file:line references, diagram observations). Outputs a reviewed CSV matrix and a self-contained HTML evidence report.

example-output/asvs-report-2026-04-29.csv

View on GitHub
req_id,chapter_id,chapter_name,section_id,section_name,req_description,L,status,reasoning,evidence
V1.2.1,V1,Encoding and Sanitization,V1.2,Injection Prevention,"Verify that output encoding for an HTTP response, HTML document, or XML document is relevant for the context required, such as encoding the relevant characters for HTML elements, HTML attributes, HTML comments, CSS, or HTTP header fields, to avoid changing the message or document structure.",1,COMPLIANT,Handlebars template engine is used throughout with auto-escaping enabled by default. No raw triple-brace {{{ }}} unescaped output found in any template file.,src/views/user-profile.hbs:12 — `{{user.name}}` | src/views/admin/dashboard.hbs:45 — `{{item.title}}` | src/app.js:31 — `engine('hbs' handlebars.engine({ ... }))`
V1.2.4,V1,Encoding and Sanitization,V1.2,Injection Prevention,"Verify that data selection or database queries (e.g., SQL, HQL, NoSQL, Cypher) use parameterized queries, ORMs, entity frameworks, or are otherwise protected from SQL Injection and other database injection attacks. This is also relevant when writing stored procedures.",1,COMPLIANT,Sequelize ORM is used for all database operations. No raw SQL string concatenation found. All findOne/findAll calls use where-clause objects.,src/models/User.js:23 — `User.findOne({ where: { email } })` | src/models/Order.js:67 — `Order.findAll({ where: { userId: req.user.id } })` | package.json:18 — `"sequelize": "^6.35.0"`
V1.2.5,V1,Encoding and Sanitization,V1.2,Injection Prevention,Verify that the application protects against OS command injection and that operating system calls use parameterized OS queries or use contextual command line output encoding.,1,NON_COMPLIANT,User-controlled filename is interpolated directly into a shell command string passed to exec(). No sanitization or parameterization applied.,src/routes/reports.js:89 — `exec('convert ' + req.query.filename + ' output.pdf')` | src/routes/reports.js:84 — `const filename = req.query.filename` — no validation before use
V1.3.2,V1,Encoding and Sanitization,V1.3,Sanitization,"Verify that the application avoids the use of eval() or other dynamic code execution features such as Spring Expression Language (SpEL). Where there is no alternative, any user input being included must be sanitized before being executed.",1,NON_COMPLIANT,eval() is called with a user-supplied expression string with no sanitization. The formula evaluator in the pricing engine accepts arbitrary JavaScript expressions from the request body.,src/utils/calculator.js:34 — `return eval(req.body.formula)` | src/utils/calculator.js:28 — `const formula = req.body.formula` — passed directly without sanitization
V2.1.1,V2,Validation and Business Logic,V2.1,Validation and Business Logic Documentation,"Verify that the application's documentation defines input validation rules for how to check the validity of data items against an expected structure. This could be common data formats such as credit card numbers, email addresses, telephone numbers, or it could be an internal data format.",1,NON_COMPLIANT,No dedicated security documentation defining input validation rules was found. README.md contains setup instructions only. Joi schema definitions exist in code but no documentation of the validation contract.,src/validators/userValidator.js — Joi schemas present in code but not documented | No docs/security.md or equivalent found in repository root
V5.2.1,V5,File Handling,V5.2,File Upload and Content,"Verify that the application will only accept files of a size which it can process without causing a loss of performance or a denial of service attack.",1,COMPLIANT,Multer is configured with a 10MB file size limit on all upload endpoints. Exceeding this returns HTTP 413 before the file is written to disk.,src/middleware/upload.js:15 — `limits: { fileSize: 10 * 1024 * 1024 }` | src/routes/documents.js:22 — `router.post('/upload' upload.single('file') ...)` — upload middleware applied
V5.2.2,V5,File Handling,V5.2,File Upload and Content,"Verify that when the application accepts a file, either on its own or within an archive such as a zip file, it checks if the file extension matches an expected file extension and validates that the contents correspond to the type represented by the extension. This includes, but is not limited to, checking the initial 'magic bytes', performing image re-writing, and using specialized libraries for file content validation. For L1, this can focus just on files which are used to make specific business or security decisions. For L2 and up, this must apply to all files being accepted.",1,NON_COMPLIANT,Only the file extension is checked against an allowlist. No magic byte validation or content verification is performed. An attacker can upload a PHP shell renamed to .jpg.,src/middleware/upload.js:22 — `if (!['jpg','png','pdf'].includes(ext)) reject()` | src/middleware/upload.js — no file-type or magic-bytes library imported | package.json — no 'file-type' or 'mmmagic' dependency present
V5.2.3,V5,File Handling,V5.2,File Upload and Content,"Verify that the application checks compressed files (e.g., zip, gz, docx, odt) against maximum allowed uncompressed size and against maximum number of files before uncompressing the file.",2,NOT_RELEVANT,The application accepts PDF and image uploads only. No compressed archive formats (zip/gz/docx/odt) are accepted or processed anywhere in the codebase.,src/middleware/upload.js:22 — allowedExtensions: ['jpg','png','pdf'] — no zip/gz/docx in list
V6.1.1,V6,Authentication,V6.1,Authentication Documentation,"Verify that application documentation defines how controls such as rate limiting, anti-automation, and adaptive response, are used to defend against attacks such as credential stuffing and password brute force. The documentation must make clear how these controls are configured and prevent malicious account lockout.",1,COMPLIANT,docs/security.md describes the rate limiting strategy: 5 failed login attempts per 15-minute window triggers a temporary lockout. express-rate-limit is referenced with configuration values documented.,docs/security.md:12 — "Login endpoint rate limited to 5 attempts per 15 minutes using express-rate-limit. Account not locked to prevent DoS; IP is throttled instead."
V6.2.1,V6,Authentication,V6.2,Password Security,Verify that user set passwords are at least 8 characters in length although a minimum of 15 characters is strongly recommended.,1,COMPLIANT,Minimum password length of 12 characters is enforced in the Joi schema used for both registration and password change.,src/validators/authValidator.js:8 — `password: Joi.string().min(12).required()`
V6.2.2,V6,Authentication,V6.2,Password Security,Verify that users can change their password.,1,COMPLIANT,A dedicated PATCH /auth/password endpoint exists and is accessible to authenticated users.,src/routes/auth.js:156 — `router.patch('/password' authMiddleware changePasswordController)`
V6.2.3,V6,Authentication,V6.2,Password Security,Verify that password change functionality requires the user's current and new password.,1,COMPLIANT,The password change controller reads currentPassword and newPassword from the request body and verifies the current password against the stored hash before updating.,src/controllers/authController.js:84 — `const valid = await bcrypt.compare(req.body.currentPassword hash)` | src/controllers/authController.js:87 — `if (!valid) return res.status(401)...`
V6.2.4,V6,Authentication,V6.2,Password Security,"Verify that passwords submitted during account registration or password change are checked against an available set of, at least, the top 3000 passwords which match the application's password policy, e.g. minimum length.",1,NON_COMPLIANT,No password blocklist or common-password check is performed. Only length and regex complexity are validated.,src/validators/authValidator.js:8-15 — only min(12) and pattern checks; no blocklist import or lookup | package.json — no 'zxcvbn' or similar library present
V6.3.1,V6,Authentication,V6.3,General Authentication Security,"Verify that controls to prevent attacks such as credential stuffing and password brute force are implemented according to the application's security documentation.",1,COMPLIANT,express-rate-limit is applied to the login endpoint matching the documented 5-per-15-min policy. CAPTCHA is not used but the rate limiting is correctly wired.,src/middleware/rateLimiter.js:1 — `const loginLimiter = rateLimit({ windowMs: 15*60*1000 max: 5 })` | src/routes/auth.js:12 — `router.post('/login' loginLimiter loginController)`
V6.3.2,V6,Authentication,V6.3,General Authentication Security,"Verify that default user accounts (e.g., ""root"", ""admin"", or ""sa"") are not present in the application or are disabled.",1,COMPLIANT,Seed files create only named test accounts with random UUIDs. No 'admin/admin' or 'root' default account exists.,src/seeds/users.js — seeded accounts use email-based identifiers; no 'admin'/'root' accounts | src/seeds/users.js:8 — `email: 'alice@example.com'` etc.
V7.2.1,V7,Session Management,V7.2,Fundamental Session Management Security,Verify that the application performs all session token verification using a trusted backend service.,1,COMPLIANT,JWT verification is performed exclusively in the server-side authMiddleware using the jsonwebtoken library. No client-side token trust.,src/middleware/auth.js:23 — `const decoded = jwt.verify(token JWT_SECRET)` | No client-side token decode-without-verify path found
V7.2.2,V7,Session Management,V7.2,Fundamental Session Management Security,"Verify that the application uses either self-contained or reference tokens that are dynamically generated for session management, i.e. not using static API secrets and keys.",1,COMPLIANT,JWTs are signed and issued dynamically at login using a per-request payload. Token value is unique per session (includes iat and jti claims).,src/services/authService.js:45 — `jwt.sign({ userId jti: uuidv4() iat: ... } JWT_SECRET { expiresIn: '30d' })`
V7.3.1,V7,Session Management,V7.3,Session Timeout,Verify that there is an inactivity timeout such that re-authentication is enforced according to risk analysis and documented security decisions.,2,NON_COMPLIANT,JWT expiry is set to 30 days with no inactivity tracking or sliding window. Stolen tokens remain valid for the full 30-day period regardless of user activity.,src/services/authService.js:45 — `expiresIn: '30d'` | No session activity table or sliding expiry mechanism found | docs/security.md — no documented justification for 30-day token lifetime
V8.1.1,V8,Authorization,V8.1,Authorization Documentation,Verify that authorization documentation defines rules for restricting function-level and data-specific access based on consumer permissions and resource attributes.,1,NON_COMPLIANT,No authorization matrix or role documentation was found. Role names (admin/user/moderator) are referenced in code but their permission boundaries are not documented anywhere.,src/middleware/authorize.js:5 — roles array referenced in code | No docs/authorization.md or equivalent found
V8.2.1,V8,Authorization,V8.2,General Authorization Design,Verify that the application ensures that function-level access is restricted to consumers with explicit permissions.,1,NON_COMPLIANT,The /admin/users DELETE endpoint is missing the authorize middleware. Any authenticated user can delete other user accounts.,src/routes/admin.js:15 — `router.delete('/users/:id' authMiddleware userController.deleteUser)` — authorize(['admin']) missing | src/routes/admin.js:8 — other admin routes correctly have `authorize(['admin'])` applied
V8.3.1,V8,Authorization,V8.3,Operation Level Authorization,"Verify that the application enforces authorization rules at a trusted service layer and doesn't rely on controls that an untrusted consumer could manipulate, such as client-side JavaScript.",1,COMPLIANT,All authorization checks are enforced in server-side middleware (authorize.js) that reads role from the verified JWT payload. No client-supplied role field is used.,src/middleware/authorize.js:12 — `const role = req.user.role` — role read from verified token payload | No route reads role from req.body or query string
V9.1.1,V9,Self-contained Tokens,V9.1,Token source and integrity,Verify that self-contained tokens are validated using their digital signature or MAC to protect against tampering before accepting the token's contents.,1,COMPLIANT,jwt.verify() is called with the server-side secret before any token claims are trusted. Token contents are only read from the decoded payload returned by verify().,src/middleware/auth.js:23 — `const decoded = jwt.verify(token JWT_SECRET)` | src/middleware/auth.js:25 — `req.user = decoded` — only set after successful verify
V9.1.2,V9,Self-contained Tokens,V9.1,Token source and integrity,"Verify that only algorithms on an allowlist can be used to create and verify self-contained tokens, for a given context. The allowlist must include the permitted algorithms, ideally only either symmetric or asymmetric algorithms, and must not include the 'None' algorithm. If both symmetric and asymmetric must be supported, additional controls will be needed to prevent key confusion.",1,NON_COMPLIANT,jwt.verify() is called without specifying an algorithms option. This accepts any algorithm present in the token header including 'none'. An attacker can craft a token with alg:none to bypass signature verification.,src/middleware/auth.js:23 — `jwt.verify(token JWT_SECRET)` — no algorithms option | Secure form: `jwt.verify(token secret { algorithms: ['HS256'] })`
V9.1.3,V9,Self-contained Tokens,V9.1,Token source and integrity,"Verify that key material that is used to validate self-contained tokens is from trusted pre-configured sources for the token issuer, preventing attackers from specifying untrusted sources and keys. For JWTs and other JWS structures, headers such as 'jku', 'x5u', and 'jwk' must be validated against an allowlist of trusted sources.",1,COMPLIANT,The JWT_SECRET is read from an environment variable at startup. No jku/x5u/jwk header handling is present. The jsonwebtoken library used does not fetch remote keys by default.,src/config/jwt.js:4 — `const JWT_SECRET = process.env.JWT_SECRET` | src/middleware/auth.js — no jku/x5u header parsing logic found | jsonwebtoken v9.0.2 — does not perform remote key fetch by default
V10.1.1,V10,OAuth and OIDC,V10.1,Generic OAuth and OIDC Security,"Verify that tokens are only sent to components that strictly need them. For example, when using a backend-for-frontend pattern for browser-based JavaScript applications, access and refresh tokens shall only be accessible for the backend.",2,NOT_RELEVANT,"The application implements JWT-based authentication directly. No OAuth 2.0 authorization server, OIDC provider, or OAuth client flow is used. All V10 controls are not applicable.",package.json — no passport-oauth2 / openid-client / oauth library present | src/services/authService.js — custom JWT issuance only
V11.2.1,V11,Cryptography,V11.2,Secure Cryptography Implementation,"Verify that industry-validated implementations (including libraries and hardware-accelerated implementations) are used for cryptographic operations.",2,COMPLIANT,Node.js built-in crypto module is used for all cryptographic operations. bcrypt (via bcryptjs) is used for password hashing. Both are industry-validated implementations.,src/utils/crypto.js:3 — `const crypto = require('crypto')` | src/services/authService.js:12 — `const bcrypt = require('bcryptjs')` | package.json — `"bcryptjs": "^2.4.3"`
V11.2.2,V11,Cryptography,V11.2,Secure Cryptography Implementation,"Verify that the application is designed with crypto agility such that random number, authenticated encryption, MAC, or hashing algorithms, key lengths, rounds, ciphers and modes can be reconfigured, upgraded, or swapped at any time, to protect against cryptographic breaks.",2,NON_COMPLIANT,"AES algorithm, key length, and mode are hardcoded as string literals throughout the encryption utility. Changing the algorithm requires modifying multiple files with no central configuration.",src/utils/crypto.js:15 — `crypto.createCipheriv('aes-256-gcm' key iv)` — algorithm hardcoded | src/utils/crypto.js:44 — `crypto.createDecipheriv('aes-256-gcm' ...)` — repeated | No CRYPTO_ALGORITHM config value or abstraction layer
V11.3.1,V11,Cryptography,V11.3,Encryption Algorithms,"Verify that insecure block modes (e.g., ECB) and weak padding schemes (e.g., PKCS#1 v1.5) are not used.",1,COMPLIANT,AES-256-GCM is used for symmetric encryption throughout. GCM is an authenticated mode; ECB mode is not present. No RSA PKCS#1 v1.5 padding found.,src/utils/crypto.js:15 — `createCipheriv('aes-256-gcm' ...)` | Grep for 'ecb'/'pkcs1' across codebase returned no results
V12.1.1,V12,Secure Communication,V12.1,General TLS Security Guidance,"Verify that only the latest recommended versions of the TLS protocol are enabled, such as TLS 1.2 and TLS 1.3. The latest version of the TLS protocol must be the preferred option.",1,COMPLIANT,"nginx reverse proxy (shown in architecture diagram) is configured with ssl_protocols TLSv1.2 TLSv1.3 only. TLS 1.0 and 1.1 are explicitly excluded. Confirmed in nginx.conf and corroborated by the architecture diagram showing TLS termination at the proxy.",nginx.conf:34 — `ssl_protocols TLSv1.2 TLSv1.3` | nginx.conf:35 — `ssl_prefer_server_ciphers on` | architecture-diagram.png: TLS termination layer shown before app server
V12.1.2,V12,Secure Communication,V12.1,General TLS Security Guidance,"Verify that only recommended cipher suites are enabled, with the strongest cipher suites set as preferred. L3 applications must only support cipher suites which provide forward secrecy.",2,COMPLIANT,nginx cipher suite list uses ECDHE and DHE suites exclusively ensuring forward secrecy. RC4 and DES are not present.,nginx.conf:36 — `ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:...` | grep for 'RC4\|DES\|EXPORT' in nginx.conf returned no results
V13.2.1,V13,Configuration,V13.2,Backend Communication Configuration,"Verify that communications between backend application components that don't support the application's standard user session mechanism, including APIs, middleware, and data layers, are authenticated. Authentication must use individual service accounts, short-term tokens, or certificate-based authentication and not unchanging credentials such as passwords, API keys, or shared accounts with privileged access.",2,NON_COMPLIANT,"Internal calls to the reporting microservice use a long-lived shared API key stored in an environment variable. The key never rotates and is shared across all service instances, violating the requirement for short-term tokens or individual service accounts.",src/services/reportingService.js:12 — `headers: { 'X-Internal-Key': process.env.INTERNAL_API_KEY }` | .env.example — `INTERNAL_API_KEY=changeme` — static key | No token rotation or certificate-based auth mechanism found
V13.2.2,V13,Configuration,V13.2,Backend Communication Configuration,Verify that communications between backend application components including local or operating system services and APIs are performed with accounts assigned the least necessary privileges.,2,COMPLIANT,PostgreSQL connection uses a dedicated application user (acme_app) with SELECT/INSERT/UPDATE/DELETE only. No CREATE/DROP/ALTER grants.,config/database.js:8 — `user: process.env.DB_USER` | DB_USER is 'acme_app' per deployment docs | SQL grant script in ops/db-grants.sql — `GRANT SELECT INSERT UPDATE DELETE ON ALL TABLES TO acme_app`
V14.2.1,V14,Data Protection,V14.2,General Data Protection,"Verify that sensitive data is only sent to the server in the HTTP message body or header fields, and that the URL and query string do not contain sensitive information, such as an API key or session token.",1,NON_COMPLIANT,The webhook verification endpoint accepts the HMAC signature as a query string parameter (?sig=). This causes the secret to appear in server access logs and browser history.,src/routes/webhooks.js:23 — `const sig = req.query.sig` | src/routes/webhooks.js:21 — `router.get('/webhook' (req res) => {` — GET with sig in query string | nginx access_log will record full URL including sig value
V14.3.1,V14,Data Protection,V14.3,Client-side Data Protection,"Verify that authenticated data is cleared from client storage, such as the browser DOM, after the client or session is terminated. The 'Clear-Site-Data' HTTP response header field may be able to help with this but the client-side should also be able to clear up if the server connection is not available when the session is terminated.",1,NOT_RELEVANT,"Application is a pure REST API with no server-side rendered views or HTML pages. There is no browser DOM managed by the application. Client-side storage clearing is the responsibility of the consuming frontend application, which is out of scope.",src/app.js — express() API only; no view engine configured for authenticated pages | No HTML templates for authenticated sessions found
V16.2.1,V16,Security Logging and Error Handling,V16.2,General Logging,"Verify that each log entry includes necessary metadata (such as when, where, who, what) that would allow for a detailed investigation of the timeline when an event happens.",2,NON_COMPLIANT,"Log entries include timestamp and message only. The 'who' (user ID) and 'where' (endpoint/IP) metadata are absent from most log calls. Correlating an incident to a specific user or request is not possible with current log structure.",src/utils/logger.js:12 — `logger.info(message)` — no userId or req metadata | src/routes/orders.js:67 — `logger.info('Order created')` — no order ID or user ID included | Winston is configured with timestamp only: no request context middleware
V16.3.1,V16,Security Logging and Error Handling,V16.3,Security Events,"Verify that all authentication operations are logged, including successful and unsuccessful attempts. Additional metadata, such as the type of authentication or factors used, should also be collected.",2,COMPLIANT,"Successful logins, failed logins, and password changes are all logged at the controller level with userId and IP address. Log entries include event type.",src/controllers/authController.js:45 — `logger.info({ event: 'login_success' userId ip: req.ip })` | src/controllers/authController.js:52 — `logger.warn({ event: 'login_failure' email ip: req.ip })` | src/controllers/authController.js:91 — `logger.info({ event: 'password_change' userId })`
deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall