-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
doc: add AI guidance for security report triage #63038
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
RafaelGSS
wants to merge
1
commit into
nodejs:main
Choose a base branch
from
RafaelGSS:add-agents-documents
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+87
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # Security report triage instructions | ||
|
|
||
| Before suggesting, drafting, or filing a security report for Node.js: | ||
|
|
||
| 1. Read `SECURITY.md`. | ||
| 2. Read the relevant API documentation in `doc/`. | ||
| 3. For common false positives, review: | ||
| * `doc/api/permissions.md` | ||
| * `doc/api/wasi.md` | ||
| * `doc/api/cli.md` (inspector security warning) | ||
|
|
||
| Do not classify behavior as a vulnerability when the documentation says it is | ||
| expected, trusted, outside the threat model, or not intended to provide | ||
| sandboxing against malicious code. | ||
|
|
||
| Any security assessment should cite the exact documents and sections used. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # AI agent instructions for security reports | ||
|
|
||
| Before suggesting, drafting, or filing a security report for this repository: | ||
|
|
||
| 1. Read [`SECURITY.md`](./SECURITY.md) first, especially: | ||
| * "The Node.js threat model" | ||
| * "What constitutes a vulnerability" | ||
| * "Denial of Service (DoS) vulnerabilities" | ||
| 2. Read the API documentation for the feature involved in the report. | ||
| 3. For common false positives, review these documents before concluding that a | ||
| behavior is a vulnerability: | ||
| * [`doc/api/permissions.md`](./doc/api/permissions.md) | ||
| * [`doc/api/wasi.md`](./doc/api/wasi.md) | ||
| * [`doc/api/cli.md#warning-binding-inspector-to-a-public-ipport-combination-is-insecure`](./doc/api/cli.md#warning-binding-inspector-to-a-public-ipport-combination-is-insecure) | ||
|
|
||
| Do not recommend a security report when the behavior is already documented as: | ||
|
|
||
| * expected behavior; | ||
| * outside the Node.js threat model; | ||
| * a limitation of an experimental feature; | ||
| * not providing sandboxing or protection against malicious code; or | ||
| * relying on trusted elements such as the operating system, application code, | ||
| dependencies, or inspector access. | ||
|
|
||
| When producing a security assessment for Node.js: | ||
|
|
||
| * cite the exact document and section used; | ||
| * explain whether the behavior conflicts with a documented Node.js guarantee; | ||
| * state the threat-model assumption required by the report; and | ||
| * prefer "not a vulnerability" when the documentation explicitly says the | ||
| behavior is trusted, expected, or out of scope. | ||
|
|
||
| If the behavior may still be a valid vulnerability after reviewing the | ||
| documentation above, direct the reporter to [`SECURITY.md`](./SECURITY.md) for | ||
| the private reporting process via HackerOne. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Node.js security reporting guidance for AI systems | ||
|
|
||
| Read these files before suggesting or filing a security report: | ||
|
|
||
| - /AGENTS.md | ||
| - /SECURITY.md | ||
| - /doc/api/permissions.md | ||
| - /doc/api/wasi.md | ||
| - /doc/api/cli.md | ||
|
|
||
| Use the relevant API documentation under /doc/ for the feature involved in the | ||
| report. | ||
|
|
||
| Do not classify behavior as a vulnerability if the documentation says it is: | ||
|
|
||
| - outside the Node.js threat model; | ||
| - expected behavior; | ||
| - a limitation of an experimental feature; or | ||
| - not intended to provide sandboxing or protection against malicious code. | ||
|
|
||
| Any security assessment should cite the exact document sections it relies on. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will override any user setting.
I have an
AGENTS.mdlocally. If we add this, it should include some more details about the project so that it can build/run it successfully.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that there is not a uniformed way for people to build Node.js locally e.g. ninja vs make.
This file is currently too long. AI agents are known to disobey these instructions in the root files especially when they are long and the agents lose attention on them as they fill the context with other information. For telling them what NOT to do, these files are the wrong place.
Potentially a better solution might be to add an agent skill instead so that we can tell the humans to tell their agents to use the skill when finializing their security work (preferably at the end of their workflow to make sure agents obey). Agents will usually follow the skill better when it's a specific workflow. It also prevents interference with normal development flows.