Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Bug report
description: The skill or a validator behaves differently from what its documentation says.
body:
- type: textarea
id: behavior
attributes:
label: What happened
description: Include the file and section, or the validator command and its output.
validations:
required: true
- type: textarea
id: expected
attributes:
label: What you expected
description: Quote the documentation or schema rule the behavior contradicts, if there is one.
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: How to reproduce
description: Minimal steps or a small findings.json or coverage-ledger.json fixture.
- type: input
id: environment
attributes:
label: Environment
description: Agent and model, operating system, and Node.js version.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Report a security vulnerability
url: https://www.cloudflare.com/.well-known/security.txt
about: Do not file security vulnerabilities as public issues.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Proposal
description: A new attack class, companion file, or change to the workflow or schema.
body:
- type: textarea
id: problem
attributes:
label: Problem
description: What the skill misses or gets wrong today, with an example target or run if you have one.
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Proposal
description: The change, which files it touches, and how it fits the existing section schema and evidence bar.
validations:
required: true
- type: textarea
id: related
attributes:
label: Related issues and pull requests
description: Open issues or pull requests that overlap with this one.
17 changes: 17 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Summary

<!-- What changes and why. Link related open pull requests. -->

Closes #

## Validation

<!-- Commands you ran and what they showed, for example:
node --test validate-findings.test.cjs validate-coverage-ledger.test.cjs -->

## Checklist

- [ ] One change, scoped to the linked issue
- [ ] Prose and schema still agree
- [ ] Verbatim prompt blocks changed in every copy, or not at all
- [ ] Validators still use only the Node.js standard library
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Test

on:
pull_request:
paths:
- "skills/security-audit/**"
- ".github/workflows/test.yml"
push:
branches: [main]
paths:
- "skills/security-audit/**"
- ".github/workflows/test.yml"

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
validators:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: lts/*
- name: Run validator tests
working-directory: skills/security-audit
run: node --test validate-findings.test.cjs validate-coverage-ledger.test.cjs
37 changes: 37 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Contributing

Thanks for helping improve the security-audit skill. This guide covers what is specific to this repository. The Cloudflare-wide [contributing guide](https://github.com/cloudflare/.github/blob/master/CONTRIBUTING.md) and [Code of Conduct](https://github.com/cloudflare/.github/blob/master/CODE_OF_CONDUCT.md) also apply.

## Before you open a pull request

- **Open an issue first** for new attack classes, companion files, workflow changes, or schema changes, so the design can be discussed before you write it. Typo and small correctness fixes do not need one.
- **Search open pull requests.** Many changes touch the same few files, especially the two validators. If an open PR already covers your change, review or build on it instead of opening a parallel one, and link related PRs in your description.
- **Keep one change per pull request.** A validator fix, a prompt change, and a new companion are three PRs.

Do not report vulnerabilities in this repository through public issues or pull requests. See [SECURITY.md](SECURITY.md).

## Repository layout

The installable skill lives in `skills/security-audit/`. Everything an agent loads at run time must stay inside that directory so `npx skills add` installs it. Repository-only files (this guide, CI, templates) stay at the root or in `.github/`.

## Standards

- **One house style.** Match the structure, terminology, and tone of the surrounding files. Domain companions share one section schema: `When to use this file`, a fenced `Core discipline` block, attack classes tagged with `subagent_type`, `Universal moves`, and `Validation rules`. Hunter prompts reference these headings by name.
- **Verbatim blocks stay identical.** Blocks marked to be copied verbatim into prompts, such as the artifact promotion procedure, must change in every copy at once.
- **Prose and schema agree.** A change to a verdict, field, or state in `report-schema.json` or the coverage ledger contract needs the matching change in the Markdown that describes it, and the reverse.
- **The validators have no dependencies.** `validate-findings.cjs` and `validate-coverage-ledger.cjs` use only the Node.js standard library. Keep their input limits, safe-open behavior, and capped, sanitized error output intact.
- **The evidence bar does not move.** Changes must not let a finding be confirmed without a complete source trace and bounded local evidence, or relax the sandbox and `needs_validation` rules.

## Testing

Run both suites from `skills/security-audit/` with a current Node.js LTS release:

```sh
node --test validate-findings.test.cjs validate-coverage-ledger.test.cjs
```

Add or update tests for any validator or schema change. In the pull request, list the commands you ran and what they showed.

## Commits and pull requests

Write commit subjects as short imperative sentences, for example `Reject invalid trace line numbers`, and explain why in the body. Fill in the pull request template and link the issue it resolves with `Closes #<number>`.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ The skill activates automatically when the request matches its trigger (security
- **Defense-in-depth gaps are not vulnerabilities.** If Layer A prevents the attack, the absence of Layer B is a hardening note.
- **Multiple runs improve coverage.** In our test runs, a single run found roughly half of the vulnerabilities that repeated runs found in total.

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md). Report vulnerabilities as described in [SECURITY.md](SECURITY.md), not in public issues.

## Contact

Questions, feedback, or comparing notes on AI-driven security tooling: security-ai-research@cloudflare.com
Expand Down
3 changes: 3 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Reporting Security Vulnerabilities

Please see [this page](https://www.cloudflare.com/.well-known/security.txt) for information on how to report a vulnerability to Cloudflare. Thanks!