chore(lint): add CWE-tagged security rules for src - #79
Open
ofri-peretz wants to merge 1 commit into
Open
Conversation
Scoped to src/**/*.{js,mjs,cjs,ts,tsx}. Measured against this repository first: 0 findings, so the block goes red on a new one rather than on what is here today.
Pinned exactly rather than as a range, and to a release older than the 1-day minimum this repository declares.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Adds
eslint-plugin-secure-codingand enables its recommended rules onsrc/**/*.{js,mjs,cjs,ts,tsx}.No defect is claimed. I measured this repository before proposing anything: 0 findings across the scoped paths. That is the reason to add it rather than a caveat — the block can only go red on something introduced later.
Why this repository
It already runs ESLint with a flat config and lints in CI, and there is no security plugin in the chain today. The rules carry CWE and CVSS metadata, so a finding arrives with a classification rather than a message to interpret.
What I checked before opening this
src/**/*.{js,mjs,cjs,ts,tsx}with the recommended preset, using the version pinned below.5.1.2, which is older than that window. No exception requested.If this is not wanted
Close it and I will not open another. If you would rather have a subset — say, only the injection rules — tell me which and I will send that instead.
🤖 Generated with Claude Code