SkillsReviewed · addyosmani

Security and Hardening

Security and Hardening is an instruction skill for web developers using AI coding assistants, but its examples need project-specific adaptation and its full checklist sits outside the supplied files. It covers threat modeling, application controls, dependency security, privacy and LLM features, with mostly TypeScript implementation examples.

Researched 13 Nov 2026

In short.

Security and Hardening is an instruction skill for web developers using AI coding assistants, but following it does not establish that an application is secure. It combines threat modeling with implementation rules and reference examples for authentication, authorization, input handling, dependencies, privacy and LLM features. Particularly useful details address DNS-rebinding gaps, distributed rate limits and authorization for destructive file operations. A shared checklist referenced throughout is outside the supplied scope. No code, installation or security audit was executed, so runtime behavior and effectiveness are not assessed.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage includes both complete selected files under skills/security-and-hardening at revision 301b02b12bff98e4688e6984af6556802322bbde: SKILL.md and references/hardening-patterns.md. The repository LICENSE is included as the related notice outside that folder. Linked pages, the repository-wide references/security-checklist.md, other skills and all other folders are excluded. Original captured source addresses are retained. No code, commands, installation, dependency audit or application behavior was executed or tested.

The overview

Identity

The resource is the security-and-hardening instruction skill in Addy Osmani's agent-skills repository. Its selected folder contains SKILL.md and references/hardening-patterns.md. The instruction file describes when an assistant should apply the skill; the reference supplies examples and decision aids. The original folder address is [https://github.com/addyosmani/agent-skills/tree/main/skills/security-and-hardening].

This is a reusable set of assistant instructions and supporting documentation. The supplied files do not define a standalone scanner, hosted security service or executable application.

Assessment

The skill is useful as a structured aid for security-sensitive development and code review. It connects broad rules to concrete failure modes: authorization must apply to the requested resource, dependency audits cover known advisories, and rate limits need shared counters across application instances.

Its breadth also creates an integration burden. Developers must connect controls spread across sections, adapt framework-specific examples and obtain the referenced shared checklist before following the complete sign-off process. No supplied results establish that an assistant consistently follows these instructions or that using them reduces vulnerabilities.

Users

The intended users are developers asking coding assistants to build or review web features involving user input, authentication, sensitive data, uploads, external services or dependencies. Teams adding chatbots, summarizers, agents or retrieval-augmented generation also receive specific guidance about untrusted model output, tool permissions and tenant separation.

Beginners can use the threat questions and examples to recognize common risks. Experienced developers get more detailed cautions about supply-chain review, filesystem races and distributed deployment. The material assumes enough programming knowledge to adapt code, configure infrastructure and judge whether a vulnerability is reachable.

Capabilities

The instructions cover parameterized database queries, output encoding, resource-level authorization, password hashing, session cookies, security headers, restricted CORS, schema validation, uploads, secrets and rate limiting. They also address server-side request forgery, where an attacker persuades a server to fetch internal resources.

Dependency guidance includes identifying the authoritative package manager and lockfile, blocking unreviewed installation scripts, assessing advisory reachability and documenting deferred fixes. Privacy guidance covers field classification, purpose, retention, export and deletion. LLM guidance treats generated text as untrusted input and calls for validated tool arguments, limited permissions and bounded resource use.

These are instructions and examples for implementing controls. The files do not themselves scan a repository, enforce permissions, rotate credentials or delete personal data.

Using it

Requirements

Using the resource as a skill requires an assistant environment capable of loading its instructions. The supplied files do not identify supported assistant products, model requirements, minimum versions or a verified loading mechanism. Applying its guidance requires access to the relevant application code, configuration, dependency lockfile and deployment context.

Most implementation examples use JavaScript or TypeScript libraries, including Express-style middleware, bcrypt, Helmet, Zod and DOMPurify. Other examples use IP-address parsing and shared rate-limit services. These are dependencies of particular examples, not an established installation list for the whole skill; required versions and compatibility are unknown.

Mechanism

The process begins by identifying assets and trust boundaries: places where data written by another party enters the system. It then applies STRIDE, a framework covering impersonation, tampering, denial of actions, information disclosure, denial of service and privilege escalation. Abuse cases turn those threats into concrete scenarios to check.

The skill groups work into controls it says to always apply, changes it says require human approval, and prohibited practices. It directs the assistant to consult the relevant reference section when working on that code, then use a final verification checklist. These written directions depend on the assistant and developer following them; no enforcement mechanism is supplied.

Setup

Consult the chosen assistant's documented skill-loading mechanism, since these files provide no host-specific installation command. Preserve SKILL.md alongside references/hardening-patterns.md so the local implementation links retain their intended layout.

The skill also references ../../references/security-checklist.md, a repository-wide file outside this selected folder. That checklist was not supplied. The selected folder therefore does not contain everything referenced by the full review process. No installation or host compatibility was assessed.

Example

For an import-from-URL feature, the skill would frame the submitted URL as untrusted input and identify internal services as assets at risk. Its reference example permits HTTPS and an explicit hostname, resolves all returned addresses, rejects private or reserved addresses and disables redirects.

The reference explicitly explains the remaining gap: the HTTP fetch resolves DNS again after validation. An address could change between the check and connection, a time-of-check/time-of-use race. It recommends connecting to a pinned resolved IP or using a filtering agent for higher-risk cases. This illustrates the guidance and its stated limits; the example was not executed.

Assessment & evidence

Limitations

Individual examples implement only part of the overall guidance. The upload validator checks reported MIME type and size but does not implement the content-byte verification discussed in the text. The ownership-checking update route forwards req.body without showing the boundary schema validation required elsewhere. Copying either example alone would leave relevant controls unspecified.

The source acknowledges important remaining risks: DNS validation can race with connection, ownership markers can be forged without integrity protection, and filesystem ancestors can change between checking and operating. Its default in-memory rate-limit example also needs a shared store when several processes serve traffic.

The shared security checklist is outside the supplied scope. Privacy prescriptions are broad and provide no jurisdiction-specific compliance determination. The snippets were not executed; assistant adherence, supported environments and security outcomes are not assessed.

Reasoning

A useful organizing principle is that trust follows who wrote a value. The skill applies this to model output, filenames and another process's command line, preventing apparently internal data from being automatically treated as authorized. It also separates authentication, which identifies a user, from authorization to act on a particular resource.

This approach can help developers ask better questions before applying individual controls. The benefit is a reasoned assessment of the material's structure, not a measured outcome. Broad coverage and concrete examples do not establish completeness for a particular architecture.

Alternatives

A developer could consult the supplied hardening-patterns.md manually for a focused implementation question. Loading the full instruction skill adds its threat-modeling sequence, action boundaries and verification expectations.

The material also points to a repository-wide security checklist and OWASP guidance, including the 2025 Top 10 for LLM Applications. Those linked resources are outside the supplied scope and were not assessed. No comparative evidence establishes how this skill performs against another skill, scanner or independent security review.

Evidence

The supplied evidence contains the complete selected SKILL.md and its local hardening-patterns.md reference, plus the repository LICENSE. Both selected documents are pinned to source revision 301b02b12bff98e4688e6984af6556802322bbde.

The original captured instruction file is [https://raw.githubusercontent.com/addyosmani/agent-skills/301b02b12bff98e4688e6984af6556802322bbde/skills/security-and-hardening/SKILL.md]. Its captured implementation reference is [https://raw.githubusercontent.com/addyosmani/agent-skills/301b02b12bff98e4688e6984af6556802322bbde/skills/security-and-hardening/references/hardening-patterns.md].

These files support descriptions of the intended process, examples and stated caveats. They contain no execution results demonstrating installation success, vulnerability prevention or compliance.

Access & freshness

Costs

No price, token budget or total operating-cost estimate is provided. The MIT licence grants broad usage rights, but does not establish the cost of obtaining an assistant, using a model or operating the resulting application.

Some examples involve a shared rate-limit store, including Redis-backed or Upstash-based approaches. Their service costs, infrastructure requirements and implementation effort are not established. No cost saving or productivity measurement is supplied.

Rights

The supplied repository MIT licence credits Addy Osmani, copyright 2025. It permits use, copying, modification, distribution, sublicensing and sale, provided the copyright and permission notices remain in copies or substantial portions. It also disclaims warranties and liability. The captured notice is available at [https://raw.githubusercontent.com/addyosmani/agent-skills/301b02b12bff98e4688e6984af6556802322bbde/LICENSE].

This supports redistribution of the captured skill documentation with the required notice. Separate licence terms for third-party packages named in examples were not supplied and are not established by the repository notice.

Freshness

The supplied snapshot was captured on 13 November 2026 at 21:05:10 UTC from revision 301b02b12bff98e4688e6984af6556802322bbde. This identifies the analyzed source; it does not establish when the skill was written or last maintained. No numbered skill release is established.

The documents explicitly reference the 2021 OWASP web Top 10 ordering and the 2025 OWASP Top 10 for LLM Applications. Later source changes, alignment with subsequent guidance and compatibility with current package APIs are not assessed.

Actions

Begin with one bounded feature, such as login or URL importing. Identify its assets, externally written inputs and authorization rules, then use the relevant reference patterns to plan implementation. Confirm the chosen assistant's loading procedure and obtain the referenced shared checklist before relying on the skill's complete sign-off process.

Validate the controls in the actual application: check cross-user authorization, malformed inputs, relevant upload or URL handling, session behavior and rate limits under the intended deployment. Review dependency findings against the authoritative lockfile and reachable code paths. For LLM features, verify that generated output and tool arguments pass explicit validation. These are recommended next steps; no such validation was performed.

Evidence for this report

LICENSEnotice · checked 2026-11-13
skills/security-and-hardening/SKILL.mdselected · checked 2026-11-13