@agent-appsec-advisor:shared:prose-samplesfrom appsec-advisor
Worked examples of Before/After pairs that transform AI-flavored report prose into human-style writing, used by renderer agents when authoring threat-model documents.
Ships in appsec-advisor. Installing the plugin adds it to Claude Code.
Companion to
prose-style.md. That file states the rules; this file shows them applied to real prose. Each pair is a passage that was actually rendered into a threat-model report, the AI-flavored pattern it exhibited, the human-style rewrite, and the rule that follows.Loaded by the renderer and finalization agents before authoring
ms-verdict.json,ms-architecture-assessment.json, and the §6 Security Architecture control narratives (H4 intro paragraphs and**Security assessment**blocks). Pairs A–E and H target Management-Summary fields; Pairs F–G target §6 control prose.
ms-verdict.json::opening)🔴 Not production-ready. This deliberately vulnerable training application embeds intentional weaknesses across every tier of its architecture. The application exposes multiple independent paths to full account and host compromise that require no elevated privilege or specialised tooling - a user with only a browser and repository read access can bypass authentication entirely. Closing the risk requires structural changes at the authentication, data-access, and secret-management layers, not a single-point patch.
🔴 Critical security concerns were identified in the assessed scope. The evidenced paths let unauthorized users take over administrative accounts and the host, requiring changes to the affected controls before the team makes a deployment decision.
ms-verdict.json::closing_prose)Nineteen mitigations are identified; replacing the hardcoded secrets with runtime-injected values, switching to parameterized database queries, and upgrading the password hashing algorithm address the highest-impact paths and are prerequisites for any production readiness evaluation.
Nineteen mitigations follow. Three matter most: move secrets out of source, switch raw SQL to parameterized queries, replace MD5 password hashes. Those three close the evidenced admin-takeover paths.
-ing forms → "X. Y. Z." with imperative verbsms-architecture-assessment.json::weaknesses[0].description)A 1024-bit RSA private key, an HMAC secret, and a cookie-signing secret are all hardcoded as string literals in
lib/insecurity.ts. These are repository-public values — anyone who clones the repo can sign arbitrary JWTs or forge session cookies without server access.
Already pretty good — concrete, has the file path, punchline at the end. But:
Three secrets live as hardcoded string literals in
lib/insecurity.ts: a 1024-bit RSA private key, an HMAC secret, and a cookie-signing secret. Cloning the repo gives you everything needed to sign JWTs or forge session cookies — no server access required.
ms-architecture-assessment.json::weaknesses[3].description)Several REST endpoints exposed via
finale-restaccept mass-assignment updates to privileged model fields; the product update endpoint atserver.ts:361has no authentication middleware; and Angular route guards enforce access control only in the browser without a server-side equivalent. Authorization is inconsistent across the API surface.
finale-restexposes REST endpoints that accept mass-assignment to privileged model fields. The product update atserver.ts:361runs without auth middleware. Angular route guards run only in the browser; there is no server-side equivalent. Three different gaps, one missing piece: server-side authorization as a pattern.
Despite the structurally deficient design, the project carries a baseline of categorical strengths. The table below groups individual controls into broad-stroke clusters (full per-control breakdown in Section 7). Only clusters that genuinely rate as a strength (Adequate or Partial) appear here - clusters demoted to Weak by open Critical/High findings in their defensive remit are excluded from this section and live in §6 instead.
Not everything is broken. The clusters below list controls that actually work (Adequate or Partial). Anything weakened by an open Critical/High finding moved to §6 instead — appearing here would be misleading.
security-architecture.md H4 positive-case intro)The application uses Sequelize as an ORM layer to query SQLite, with the intention that user-supplied values are passed as bound parameters rather than concatenated into query strings, preventing query structure from being altered by attacker-controlled input.
Sequelize backs most relational queries in this codebase. Two routes opt out and build SQL by hand — the password login (
routes/login.ts:34) and product search (routes/search.ts:23) call rawmodels.sequelize.query().
security-architecture.md **Security assessment**)The login query at
routes/login.ts:34builds its SQL string by directly interpolatingreq.body.emailand the pre-hashed password into a rawmodels.sequelize.query()call, bypassing Sequelize's parameter binding entirely. A' OR 1=1--payload in the email field short-circuits the WHERE clause and returns the first database row, which is the seeded admin account. Separately,lib/insecurity.ts:43hashes passwords with unsalted MD5, so any database dump obtained through injection immediately yields recoverable plaintext credentials for all accounts.
Two independent weaknesses sit on the login path:
routes/login.ts:34interpolatesreq.body.emailinto a rawmodels.sequelize.query()string.' OR 1=1--short-circuits the WHERE clause and returns the seeded admin row.lib/insecurity.ts:43hashes passwords with unsalted MD5, so any dump from that injection yields plaintext for every account.
Adjectives: robust, comprehensive, holistic, seamless, crucial, vital, key (as a modifier), categorical, broad-stroke, structurally deficient
Verbs: leverage, facilitate, ensure, enable, embed (except in the sense of "embedded systems"), carry a baseline of
Quantifiers without a number: several, multiple, various, numerous, many
Transitions: furthermore, moreover, additionally, in essence, in summary, notably, importantly
Meta-clichés: it is worth noting, it should be noted, it is important to note, the table below shows, as can be seen
Generic closing cadences: X is Y across the Z, X requires Y at the A, B, and C layers, X are prerequisites for any Y
Formulaic opener stems (max. 1× per §6.X section): The application <verb>s …, The system …, The server …, The framework … — instead, begin with a route/file/library/component
Purpose-padding clauses (always cut): with the intention that …, with the expectation that …, is expected to …, is intended to …, preventing X from being Y, so that <generic purpose>
… — no server access required.Three matter most: X, Y, Z.You are writing prose that a technical reviewer would put in a PR comment thread — not a compliance report, not a consulting deck, not marketing copy. The reader is a software engineer or security reviewer who is time-pressed and allergic to filler. Write the way you would explain what you found to the next engineer on call: punchline first, evidence in the next breath, one concrete diagnosis at the end. Short sentences are allowed and good. Symmetric triplets ("X, Y, and Z") sound machine-generated; break them with em-dashes or split into separate sentences. If a sentence could appear in any security report for any app, rewrite it until it can only appear in THIS report for THIS app.
Five questions to ask about each prose field you just wrote:
≥2 negative answers → rewrite the field before saving.
ms-verdict.json::bullets[].body)The Verdict is the one block the product owner / project lead reads. Bullets must state the business consequence and the class of weakness. The refs field is audit provenance only; engineers find the detail in §8/§6. Config-level detail (config keys, library versions, CVE numbers, file:line, framework symbols, ports) belongs there, never here.
- Unauthenticated access to all endpoints —
package.jsonlists onlyexpress,lodash, andsequelize— nojsonwebtoken,passport, or session library. Every route on port 3000 is reachable without credentials.- Prototype pollution enables authorization bypass —
[email protected](CVE-2019-10744, CVSS 9.8) lets a crafted JSON body inject ontoObject.prototype; any route calling_.mergewith request input poisons auth-flag checks.- Session cookie missing
httpOnly/secure—res.cookie()is called without the hardening flags, so an XSS payload can read the session token.
_.merge, port 3000, httpOnly — none of which a PL can act on; they bury the point.
- Anyone can use the app without signing in — it ships no authentication layer, so every function is open to unauthenticated callers on the public internet.
- Attackers can read or change customer data — missing ownership checks (IDOR) let any signed-in customer read or change another customer's records.
- A normal account can gain administrator access — the account update accepts a role field (mass assignment), so any customer can make themselves an administrator.
body — that detail belongs in §6 and §8.What the agent file sets; muted values are Claude Code's defaults
prose-style, writing-samples, report-editing, threat-modeling
7-day visitors to each agent page
npx claudepluginhub appsec-foundry/appsec-advisor --plugin appsec-advisor40 agents in this plugin
appsec-abuse-case-deriverINTERNAL — proposes up to three application-specific business abuse cases from bounded architecture context at thorough depth.appsec-abuse-case-verifierINTERNAL — verifies one receipted abuse-case candidate end-to-end against bounded candidate metadata and targeted code evidence.appsec-actor-discovererINTERNAL — controller-dispatched actor discovery after config/IaC scanning and before architecture modeling; writes .actors-discovered.json and is skipped in quick mode.appsec-architect-reviewerINTERNAL context-v2 role — bounded semantic review of one component's evidenced findings before triage. Proposes independent assessment and remediation corrections; deterministic validation owns every accepted change.appsec-architecture-analystINTERNAL context-v2 role: convert validated recon and topology evidence into bounded architecture artifacts for Phases 3 through 6.appsec-authnz-analyzerStandalone AuthN/AuthZ analyzer. Consumes deterministic scanner output (source_auth_scanner, authz_confirm, route_inventory) and an optional requirements catalog to produce a cross-component authentication and authorization threat report. Runs as part of the authnz-review skill.Other plugins' agents for the same job