@lintsure/core 0.3.14 → 0.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/assessment.js +76 -76
- package/dist/src/guidance.d.ts +1 -1
- package/dist/src/guidance.js +36 -3
- package/dist/src/index.d.ts +21 -1
- package/dist/src/index.js +197 -23
- package/dist/src/knowledge/cra.js +2 -2
- package/dist/src/knowledge/gdpr.js +4 -4
- package/dist/src/knowledge/index.js +2 -2
- package/dist/src/knowledge/more.d.ts +2 -0
- package/dist/src/knowledge/more.js +88 -2
- package/dist/src/knowledge/owasp-top10.js +1 -1
- package/dist/src/review.d.ts +10 -0
- package/dist/src/review.js +25 -0
- package/dist/src/rules/api.d.ts +10 -0
- package/dist/src/rules/api.js +43 -0
- package/dist/src/rules/cra.d.ts +4 -0
- package/dist/src/rules/cra.js +72 -2
- package/dist/src/rules/index.d.ts +1 -0
- package/dist/src/rules/index.js +46 -10
- package/dist/src/rules/more.d.ts +29 -0
- package/dist/src/rules/more.js +347 -4
- package/dist/src/rules/owasp.d.ts +12 -1
- package/dist/src/rules/owasp.js +99 -32
- package/dist/src/rules/stack.js +2 -1
- package/dist/src/rules/standards.js +20 -6
- package/dist/src/types.d.ts +7 -1
- package/dist/src/verify.d.ts +20 -0
- package/dist/src/verify.js +120 -0
- package/docs/README.md +1 -1
- package/docs/agents.md +34 -1
- package/docs/frameworks.md +46 -10
- package/docs/rules.md +547 -31
- package/package.json +42 -42
package/docs/rules.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<!-- Generated from Lintsure 0.3.
|
|
2
|
-
# Lintsure rules (
|
|
1
|
+
<!-- Generated from Lintsure 0.3.16 by scripts/build-docs.mjs. -->
|
|
2
|
+
# Lintsure rules (114)
|
|
3
3
|
|
|
4
4
|
## pii.logged
|
|
5
5
|
**Personal data written to logs** · status when found: gap · risk: high
|
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A09:2025 (Security Logging and Alerting Failures); cra Annex I Part I (2)(g) (Data minimisation); owasp-llm LLM02:2026 (Sensitive Information Disclosure); cwe-top25 CWE-200 (Exposure of Sensitive Information)
|
|
8
8
|
- Fix: Mask or remove the personal field before logging, for example mask(user.email).
|
|
9
9
|
- Note: Logs are copied to many places and kept for a long time. Personal data in them is hard to find and delete.
|
|
10
|
+
- Real only when: The logged value is personal data: an email, a name, a phone number, an address, or an object that holds them (a whole user or request body). The log line runs in production code, at a level that is switched on there. The value is logged as it is, not through a masking or hashing helper.
|
|
11
|
+
- Not a problem when: A helper masks or hashes the value first, in this file or imported from another one. Only an internal id, a count or a status is logged, even if the variable is named after a person. The line is in a seed, demo, migration or debugging script that never runs for users. The log level is debug and production runs at info or above, with evidence in the logger config.
|
|
12
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/200
|
|
10
13
|
- Page: https://lintsure.com/rules/pii-logged
|
|
11
14
|
|
|
12
15
|
## secret.in-source
|
|
@@ -15,14 +18,18 @@
|
|
|
15
18
|
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A04:2025 (Cryptographic Failures); owasp-top10 A07:2025 (Authentication Failures); cra Annex I Part I (2)(e) (Confidentiality of data); owasp-llm LLM02:2026 (Sensitive Information Disclosure)
|
|
16
19
|
- Fix: Move the secret to an environment variable or secrets manager, then rotate it: it is already in your git history.
|
|
17
20
|
- Note: Anyone with read access to the repo, or a leaked copy of it, can use this key.
|
|
21
|
+
- Real only when: The value has the shape of a working key: a provider prefix, enough length and randomness, a full key body. It is in a file that is committed, not one that .gitignore keeps out. It is not replaced at build or run time by an environment variable.
|
|
22
|
+
- Not a problem when: It is a placeholder: repeated or sequential characters, the word example or test, or a value from the provider's own documentation. It decodes to ordinary text, or is a hash, an id or a public key. It is in a test or fixture and was never a real credential. If in doubt, treat it as real: a leaked key must be replaced, not just removed.
|
|
18
23
|
- Page: https://lintsure.com/rules/secret-in-source
|
|
19
24
|
|
|
20
25
|
## transport.plain-http
|
|
21
26
|
**Data sent over plain HTTP** · status when found: partial · risk: medium
|
|
22
27
|
|
|
23
|
-
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A04:2025 (Cryptographic Failures); cra Annex I Part I (2)(e) (Confidentiality of data)
|
|
28
|
+
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A04:2025 (Cryptographic Failures); cra Annex I Part I (2)(e) (Confidentiality of data); owasp-api API10:2023 (Unsafe Consumption of APIs)
|
|
24
29
|
- Fix: Use https:// for every external call.
|
|
25
30
|
- Note: Marked Partial: the call may carry no sensitive data. Confirm, then switch to HTTPS anyway.
|
|
31
|
+
- Real only when: The flagged line does what the finding says, in code or config that is in effect. Nothing nearby or elsewhere cancels it out. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
32
|
+
- Not a problem when: A stronger setting elsewhere takes effect over this one. The line only runs outside production. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
26
33
|
- Page: https://lintsure.com/rules/transport-plain-http
|
|
27
34
|
|
|
28
35
|
## pii.to-analytics
|
|
@@ -31,6 +38,8 @@
|
|
|
31
38
|
- Controls: gdpr Art. 5(1)(c) (Data minimisation); cra Annex I Part I (2)(g) (Data minimisation)
|
|
32
39
|
- Fix: Send an internal user ID instead of the email or name. If personal data must go there, list the tool as a processor.
|
|
33
40
|
- Note: Analytics vendors keep what you send them. Personal data there needs a lawful basis and a processing agreement.
|
|
41
|
+
- Real only when: The field identifies a person, or is sensitive on its own: an email, a name, a phone number, an address, health or payment data. It leaves the place it belongs: into a log, a URL, an analytics tool, a third party or long-term storage. Nothing masks, hashes or removes it first, and no consent or stated need covers this use.
|
|
42
|
+
- Not a problem when: The value is masked, hashed or shortened before this line, in this file or by an imported helper. The field is an internal id or a label that says nothing about a person. It is test or seed data with made-up people. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
34
43
|
- Page: https://lintsure.com/rules/pii-to-analytics
|
|
35
44
|
|
|
36
45
|
## pii.in-url
|
|
@@ -39,22 +48,29 @@
|
|
|
39
48
|
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A06:2025 (Insecure Design); cra Annex I Part I (2)(g) (Data minimisation); cwe-top25 CWE-200 (Exposure of Sensitive Information)
|
|
40
49
|
- Fix: Send it in the request body or a header instead of the query string.
|
|
41
50
|
- Note: URLs end up in server logs, browser history and referrer headers. Marked Partial: confirm the value is real personal data.
|
|
51
|
+
- Real only when: The field identifies a person, or is sensitive on its own: an email, a name, a phone number, an address, health or payment data. It leaves the place it belongs: into a log, a URL, an analytics tool, a third party or long-term storage. Nothing masks, hashes or removes it first, and no consent or stated need covers this use.
|
|
52
|
+
- Not a problem when: The value is masked, hashed or shortened before this line, in this file or by an imported helper. The field is an internal id or a label that says nothing about a person. It is test or seed data with made-up people. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
53
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/200
|
|
42
54
|
- Page: https://lintsure.com/rules/pii-in-url
|
|
43
55
|
|
|
44
56
|
## crypto.weak-password-hash
|
|
45
57
|
**Passwords hashed with a weak or fast algorithm** · status when found: gap · risk: high
|
|
46
58
|
|
|
47
|
-
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A04:2025 (Cryptographic Failures); cra Annex I Part I (2)(e) (Confidentiality of data)
|
|
59
|
+
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A04:2025 (Cryptographic Failures); cra Annex I Part I (2)(e) (Confidentiality of data); owasp-api API2:2023 (Broken Authentication)
|
|
48
60
|
- Fix: Use a password hashing function made for it: argon2id, scrypt or bcrypt.
|
|
49
61
|
- Note: MD5 and SHA-1 are fast, so leaked hashes can be cracked quickly.
|
|
62
|
+
- Real only when: The flagged line does what the finding says, in code or config that is in effect. Nothing nearby or elsewhere cancels it out. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
63
|
+
- Not a problem when: A stronger setting elsewhere takes effect over this one. The line only runs outside production. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
50
64
|
- Page: https://lintsure.com/rules/crypto-weak-password-hash
|
|
51
65
|
|
|
52
66
|
## transport.tls-verify-off
|
|
53
67
|
**TLS certificate checks turned off** · status when found: gap · risk: high · medium confidence (shown with --all)
|
|
54
68
|
|
|
55
|
-
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A04:2025 (Cryptographic Failures); owasp-top10 A07:2025 (Authentication Failures); cra Annex I Part I (2)(e) (Confidentiality of data)
|
|
69
|
+
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A04:2025 (Cryptographic Failures); owasp-top10 A07:2025 (Authentication Failures); cra Annex I Part I (2)(e) (Confidentiality of data); owasp-api API8:2023 (Security Misconfiguration); owasp-api API10:2023 (Unsafe Consumption of APIs)
|
|
56
70
|
- Fix: Remove the override and trust a proper certificate. For self-signed certs in tests, scope it to the test only.
|
|
57
71
|
- Note: With checks off, anyone on the network path can read or change the traffic.
|
|
72
|
+
- Real only when: The flagged line does what the finding says, in code or config that is in effect. Nothing nearby or elsewhere cancels it out. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
73
|
+
- Not a problem when: A stronger setting elsewhere takes effect over this one. The line only runs outside production. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
58
74
|
- Page: https://lintsure.com/rules/transport-tls-verify-off
|
|
59
75
|
|
|
60
76
|
## sql.string-built
|
|
@@ -63,30 +79,39 @@
|
|
|
63
79
|
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A05:2025 (Injection); cra Annex I Part I (2)(f) (Integrity of data and programs); cwe-top25 CWE-89 (SQL Injection)
|
|
64
80
|
- Fix: Use parameterized queries or your ORM's query builder. If the inserted value is fixed text from your own code, confirm it can never come from a user.
|
|
65
81
|
- Note: String-built SQL can let an attacker read or change your data (SQL injection). Marked Gap when the inserted value looks like user input, Partial when it may be fixed text from your code.
|
|
82
|
+
- Real only when: A value from a request, a form or another outside source is joined into the SQL text. The query runs with that text: no parameter binding and no query builder between them. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
83
|
+
- Not a problem when: Only constants, column names from a fixed list, or numbers your code computed are joined in. The joined value is checked against an allow-list first (a sort column picked from a map, for example). The driver's tagged template or the ORM binds the value even though the code looks like string building.
|
|
84
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/89
|
|
66
85
|
- Page: https://lintsure.com/rules/sql-string-built
|
|
67
86
|
|
|
68
87
|
## cors.any-origin
|
|
69
88
|
**API open to any website, with cookies or credentials** · status when found: partial · risk: high
|
|
70
89
|
|
|
71
|
-
- Controls: owasp-top10 A02:2025 (Security Misconfiguration); owasp-top10 A01:2025 (Broken Access Control); cra Annex I Part I (2)(b) (Secure by default configuration)
|
|
90
|
+
- Controls: owasp-top10 A02:2025 (Security Misconfiguration); owasp-top10 A01:2025 (Broken Access Control); cra Annex I Part I (2)(b) (Secure by default configuration); owasp-api API8:2023 (Security Misconfiguration)
|
|
72
91
|
- Fix: List the exact origins that may call the API. Never combine an open or reflected origin with credentials.
|
|
73
92
|
- Note: Any website can then make logged-in requests on your users' behalf and read the answers. An open origin without credentials is fine for a public API and is not reported (as in CodeQL's CORS check). Marked Partial: confirm the endpoint returns private data.
|
|
93
|
+
- Real only when: Someone who should not have access can reach this code path: the endpoint, table or function is exposed. Nothing earlier enforces the check: no middleware, gateway, database policy or wrapper covers this path. What it guards matters: other people's data, an account, money, or an action with lasting effect.
|
|
94
|
+
- Not a problem when: The check exists somewhere else that covers this path, and you can name the file and line. The data or action is public on purpose. The line only runs outside production, inside a branch that checks the environment. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
74
95
|
- Page: https://lintsure.com/rules/cors-any-origin
|
|
75
96
|
|
|
76
97
|
## session.cookie-insecure
|
|
77
98
|
**Session cookie without Secure or HttpOnly** · status when found: partial · risk: low · medium confidence (shown with --all)
|
|
78
99
|
|
|
79
|
-
- Controls: owasp-top10 A02:2025 (Security Misconfiguration); owasp-top10 A07:2025 (Authentication Failures); cra Annex I Part I (2)(b) (Secure by default configuration)
|
|
100
|
+
- Controls: owasp-top10 A02:2025 (Security Misconfiguration); owasp-top10 A07:2025 (Authentication Failures); cra Annex I Part I (2)(b) (Secure by default configuration); owasp-api API2:2023 (Broken Authentication)
|
|
80
101
|
- Fix: Set secure: true and httpOnly: true on session cookies.
|
|
81
102
|
- Note: Without these flags a session cookie can be read by scripts or sent over plain HTTP. Marked Partial: confirm it is a session cookie.
|
|
103
|
+
- Real only when: Someone who should not have access can reach this code path: the endpoint, table or function is exposed. Nothing earlier enforces the check: no middleware, gateway, database policy or wrapper covers this path. What it guards matters: other people's data, an account, money, or an action with lasting effect.
|
|
104
|
+
- Not a problem when: The check exists somewhere else that covers this path, and you can name the file and line. The data or action is public on purpose. The line only runs outside production, inside a branch that checks the environment. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
82
105
|
- Page: https://lintsure.com/rules/session-cookie-insecure
|
|
83
106
|
|
|
84
107
|
## config.debug-on
|
|
85
108
|
**Debug mode switched on in code** · status when found: partial · risk: medium · medium confidence (shown with --all)
|
|
86
109
|
|
|
87
|
-
- Controls: owasp-top10 A02:2025 (Security Misconfiguration); cra Annex I Part I (2)(b) (Secure by default configuration)
|
|
110
|
+
- Controls: owasp-top10 A02:2025 (Security Misconfiguration); cra Annex I Part I (2)(b) (Secure by default configuration); owasp-api API8:2023 (Security Misconfiguration)
|
|
88
111
|
- Fix: Read debug from an environment variable that is off in production.
|
|
89
112
|
- Note: Debug pages can show stack traces, settings and secrets. Marked Partial: it may only run locally.
|
|
113
|
+
- Real only when: The flagged line does what the finding says, in code or config that is in effect. Nothing nearby or elsewhere cancels it out. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
114
|
+
- Not a problem when: A stronger setting elsewhere takes effect over this one. The line only runs outside production. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
90
115
|
- Page: https://lintsure.com/rules/config-debug-on
|
|
91
116
|
|
|
92
117
|
## ai.automated-decision
|
|
@@ -95,6 +120,8 @@
|
|
|
95
120
|
- Controls: eu-ai-act Art. 14 (Human oversight); gdpr Art. 22 (Automated individual decisions)
|
|
96
121
|
- Fix: Route the result to a review step where a person can confirm or override it, and record who did.
|
|
97
122
|
- Note: Credit, hiring, admission and similar decisions about people are high-risk under Annex III. Marked Partial: a review step may exist elsewhere.
|
|
123
|
+
- Real only when: The field identifies a person, or is sensitive on its own: an email, a name, a phone number, an address, health or payment data. It leaves the place it belongs: into a log, a URL, an analytics tool, a third party or long-term storage. Nothing masks, hashes or removes it first, and no consent or stated need covers this use.
|
|
124
|
+
- Not a problem when: The value is masked, hashed or shortened before this line, in this file or by an imported helper. The field is an internal id or a label that says nothing about a person. It is test or seed data with made-up people. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
98
125
|
- Page: https://lintsure.com/rules/ai-automated-decision
|
|
99
126
|
|
|
100
127
|
## ai.call-not-logged
|
|
@@ -103,6 +130,8 @@
|
|
|
103
130
|
- Controls: eu-ai-act Art. 12 (Record-keeping); owasp-top10 A09:2025 (Security Logging and Alerting Failures)
|
|
104
131
|
- Fix: Log each AI call: time, model and version, input reference and output, without raw personal data.
|
|
105
132
|
- Note: High-risk systems must keep logs that let you trace what the AI did. Marked Partial: logging may happen in a wrapper or another file.
|
|
133
|
+
- Real only when: An agent or model will read or run this: the file is where the agent looks, or the call is in code that ships. The text or input is used as written: it is an instruction or a live value, not a quoted example or a warning about one. A person does not see or approve the step before it takes effect.
|
|
134
|
+
- Not a problem when: The file is a detector, a test set or documentation that lists these patterns to catch or explain them. It is the stated job of the skill or tool, and the user is asked before it happens. A limit set elsewhere applies: the agent's own permission prompts, an output cap, a sandbox.
|
|
106
135
|
- Page: https://lintsure.com/rules/ai-call-not-logged
|
|
107
136
|
|
|
108
137
|
## ai.hides-being-ai
|
|
@@ -111,6 +140,8 @@
|
|
|
111
140
|
- Controls: eu-ai-act Art. 50(1) (Transparency for AI interacting with people)
|
|
112
141
|
- Fix: Remove the instruction and tell users they are talking to an AI.
|
|
113
142
|
- Note: People must be told when they interact with an AI system, unless it is obvious. Marked Partial: role-play wording can be harmless.
|
|
143
|
+
- Real only when: An agent or model will read or run this: the file is where the agent looks, or the call is in code that ships. The text or input is used as written: it is an instruction or a live value, not a quoted example or a warning about one. A person does not see or approve the step before it takes effect.
|
|
144
|
+
- Not a problem when: The file is a detector, a test set or documentation that lists these patterns to catch or explain them. It is the stated job of the skill or tool, and the user is asked before it happens. A limit set elsewhere applies: the agent's own permission prompts, an output cap, a sandbox.
|
|
114
145
|
- Page: https://lintsure.com/rules/ai-hides-being-ai
|
|
115
146
|
|
|
116
147
|
## ai.synthetic-media
|
|
@@ -119,6 +150,8 @@
|
|
|
119
150
|
- Controls: eu-ai-act Art. 50(2) (Marking AI-generated content)
|
|
120
151
|
- Fix: Mark generated media as AI-made in a machine-readable way (for example C2PA metadata) and label deepfakes for viewers.
|
|
121
152
|
- Note: Marked Partial: you may already add marking after this call. Confirm it does.
|
|
153
|
+
- Real only when: An agent or model will read or run this: the file is where the agent looks, or the call is in code that ships. The text or input is used as written: it is an instruction or a live value, not a quoted example or a warning about one. A person does not see or approve the step before it takes effect.
|
|
154
|
+
- Not a problem when: The file is a detector, a test set or documentation that lists these patterns to catch or explain them. It is the stated job of the skill or tool, and the user is asked before it happens. A limit set elsewhere applies: the agent's own permission prompts, an output cap, a sandbox.
|
|
122
155
|
- Page: https://lintsure.com/rules/ai-synthetic-media
|
|
123
156
|
|
|
124
157
|
## ai.emotion-or-biometric
|
|
@@ -127,6 +160,8 @@
|
|
|
127
160
|
- Controls: eu-ai-act Art. 5(1)(f) (Prohibited: emotion recognition at work and in education); eu-ai-act Annex III(1) (High-risk: biometrics); gdpr Art. 9 (Special categories of personal data)
|
|
128
161
|
- Fix: Check whether this use is banned or high-risk before shipping. Remove it if it infers emotions of staff or students.
|
|
129
162
|
- Note: Some uses are banned outright since February 2025 (emotion recognition at work or in education); others are high-risk. Marked Partial: whether a ban applies depends on whose data is analysed and where, which code can't show.
|
|
163
|
+
- Real only when: The field identifies a person, or is sensitive on its own: an email, a name, a phone number, an address, health or payment data. It leaves the place it belongs: into a log, a URL, an analytics tool, a third party or long-term storage. Nothing masks, hashes or removes it first, and no consent or stated need covers this use.
|
|
164
|
+
- Not a problem when: The value is masked, hashed or shortened before this line, in this file or by an imported helper. The field is an internal id or a label that says nothing about a person. It is test or seed data with made-up people. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
130
165
|
- Page: https://lintsure.com/rules/ai-emotion-or-biometric
|
|
131
166
|
|
|
132
167
|
## path.user-input
|
|
@@ -135,6 +170,9 @@
|
|
|
135
170
|
- Controls: owasp-top10 A01:2025 (Broken Access Control); cra Annex I Part I (2)(d) (Protection from unauthorised access); cwe-top25 CWE-22 (Path Traversal)
|
|
136
171
|
- Fix: Don't pass request values into file paths. Map the request to a known file name, or use path.basename and check the result stays inside the allowed folder.
|
|
137
172
|
- Note: A path like ../../etc/passwd lets someone read or overwrite files outside the folder you meant (path traversal, CWE-22).
|
|
173
|
+
- Real only when: Part of the path comes from a request, an upload's file name or another outside source. The path is used to read, write, delete or serve a file without being resolved and checked against a base folder. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
174
|
+
- Not a problem when: The path is resolved and then checked to start with the allowed folder. The outside value is only a key into a fixed list of paths. The value is an id that passes a strict pattern (digits or a UUID) before it is used.
|
|
175
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/22
|
|
138
176
|
- Page: https://lintsure.com/rules/path-user-input
|
|
139
177
|
|
|
140
178
|
## redirect.open
|
|
@@ -143,14 +181,20 @@
|
|
|
143
181
|
- Controls: owasp-top10 A01:2025 (Broken Access Control); cra Annex I Part I (2)(j) (Limited attack surface)
|
|
144
182
|
- Fix: Redirect only to paths on your own site, or check the target against a list of allowed hosts.
|
|
145
183
|
- Note: Attackers send people a link to your site that bounces them to a phishing page (open redirect, CWE-601).
|
|
184
|
+
- Real only when: The value comes from outside your code: a request, a form, a file upload, a model's answer or another service. It reaches the flagged call unchanged, with no escaping, parameter binding, allow-list or schema check on the way. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
185
|
+
- Not a problem when: The value is a constant, or is built only from constants and your own config. A check on the way makes it safe: a parameterised query, an escaping helper, an allow-list, a validator that rejects anything unexpected. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
186
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/601
|
|
146
187
|
- Page: https://lintsure.com/rules/redirect-open
|
|
147
188
|
|
|
148
189
|
## ssrf.user-url
|
|
149
190
|
**Server fetches a URL taken from the request** · status when found: gap · risk: high
|
|
150
191
|
|
|
151
|
-
- Controls: owasp-top10 A01:2025 (Broken Access Control); cra Annex I Part I (2)(j) (Limited attack surface); cwe-top25 CWE-918 (Server-Side Request Forgery)
|
|
192
|
+
- Controls: owasp-top10 A01:2025 (Broken Access Control); cra Annex I Part I (2)(j) (Limited attack surface); cwe-top25 CWE-918 (Server-Side Request Forgery); owasp-api API7:2023 (Server Side Request Forgery)
|
|
152
193
|
- Fix: Don't let users choose the full URL your server calls. Allow only known hosts, and block internal addresses such as 169.254.169.254 and localhost.
|
|
153
194
|
- Note: Your server can be made to call internal services or cloud metadata on an attacker's behalf (server-side request forgery, CWE-918).
|
|
195
|
+
- Real only when: The address the server fetches comes from a request or stored user input. No allow-list of hosts is applied, and private and local addresses are not blocked. The response, or a difference in timing or errors, gets back to the caller.
|
|
196
|
+
- Not a problem when: The host is fixed in code and only the path or a query value varies, and that part is encoded. The address is checked against an allow-list before the request. The fetch runs in the browser, not on the server.
|
|
197
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/918
|
|
154
198
|
- Page: https://lintsure.com/rules/ssrf-user-url
|
|
155
199
|
|
|
156
200
|
## csrf.disabled
|
|
@@ -159,6 +203,9 @@
|
|
|
159
203
|
- Controls: owasp-top10 A01:2025 (Broken Access Control); cra Annex I Part I (2)(b) (Secure by default configuration); cwe-top25 CWE-352 (Cross-Site Request Forgery)
|
|
160
204
|
- Fix: Keep CSRF protection on for routes that use cookies. Turning it off is only safe for APIs that authenticate with a token header, not cookies.
|
|
161
205
|
- Note: Another site can make a logged-in user's browser submit forms to your app (cross-site request forgery, CWE-352).
|
|
206
|
+
- Real only when: Someone who should not have access can reach this code path: the endpoint, table or function is exposed. Nothing earlier enforces the check: no middleware, gateway, database policy or wrapper covers this path. What it guards matters: other people's data, an account, money, or an action with lasting effect.
|
|
207
|
+
- Not a problem when: The check exists somewhere else that covers this path, and you can name the file and line. The data or action is public on purpose. The line only runs outside production, inside a branch that checks the environment. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
208
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/352
|
|
162
209
|
- Page: https://lintsure.com/rules/csrf-disabled
|
|
163
210
|
|
|
164
211
|
## fs.world-writable
|
|
@@ -167,14 +214,19 @@
|
|
|
167
214
|
- Controls: owasp-top10 A01:2025 (Broken Access Control); cra Annex I Part I (2)(d) (Protection from unauthorised access); cwe-top25 CWE-284 (Improper Access Control)
|
|
168
215
|
- Fix: Use the narrowest permissions that work, for example 0o600 for secrets and 0o644 or 0o755 for public files.
|
|
169
216
|
- Note: Any user or process on the machine can change the file (incorrect permissions, CWE-732).
|
|
217
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
218
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
219
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/284 https://www.opencre.org/node/standard/CWE/sectionid/732
|
|
170
220
|
- Page: https://lintsure.com/rules/fs-world-writable
|
|
171
221
|
|
|
172
222
|
## config.allowed-hosts-any
|
|
173
223
|
**Django accepts any host name** · status when found: gap · risk: medium
|
|
174
224
|
|
|
175
|
-
- Controls: owasp-top10 A02:2025 (Security Misconfiguration); cra Annex I Part I (2)(b) (Secure by default configuration)
|
|
225
|
+
- Controls: owasp-top10 A02:2025 (Security Misconfiguration); cra Annex I Part I (2)(b) (Secure by default configuration); owasp-api API8:2023 (Security Misconfiguration)
|
|
176
226
|
- Fix: List your real domains in ALLOWED_HOSTS, ideally from an environment variable per environment.
|
|
177
227
|
- Note: Any Host header is accepted, which enables host header attacks such as poisoned password reset links.
|
|
228
|
+
- Real only when: The flagged line does what the finding says, in code or config that is in effect. Nothing nearby or elsewhere cancels it out. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
229
|
+
- Not a problem when: A stronger setting elsewhere takes effect over this one. The line only runs outside production. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
178
230
|
- Page: https://lintsure.com/rules/config-allowed-hosts-any
|
|
179
231
|
|
|
180
232
|
## config.default-secret-key
|
|
@@ -183,6 +235,9 @@
|
|
|
183
235
|
- Controls: owasp-top10 A02:2025 (Security Misconfiguration); owasp-top10 A07:2025 (Authentication Failures); cra Annex I Part I (2)(b) (Secure by default configuration)
|
|
184
236
|
- Fix: Generate a long random secret per environment and load it from an environment variable or secret manager.
|
|
185
237
|
- Note: With a known secret key, attackers can forge sessions, cookies or signed tokens (CWE-1394).
|
|
238
|
+
- Real only when: The value is a working credential, or the place where one will be put: long, random-looking, or with a provider's prefix. Code that runs for users reads it, or it is in a file that gets committed or shipped. Nothing replaces it before it is used: no environment variable or secret store overrides it in production.
|
|
239
|
+
- Not a problem when: It is a placeholder or an example: a made-up value, a documented test key, or text that only describes a key. It is public by design, such as a publishable or anon key meant for the browser. It is a fallback for local development only, and production fails to start without the real one.
|
|
240
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/1394
|
|
186
241
|
- Page: https://lintsure.com/rules/config-default-secret-key
|
|
187
242
|
|
|
188
243
|
## xml.external-entities
|
|
@@ -191,6 +246,9 @@
|
|
|
191
246
|
- Controls: owasp-top10 A02:2025 (Security Misconfiguration); cra Annex I Part I (2)(f) (Integrity of data and programs)
|
|
192
247
|
- Fix: Use defusedxml in Python, or turn off entity resolution and DTD loading in your parser.
|
|
193
248
|
- Note: A crafted XML file can read local files or call internal URLs (XML external entities, CWE-611).
|
|
249
|
+
- Real only when: The value comes from outside your code: a request, a form, a file upload, a model's answer or another service. It reaches the flagged call unchanged, with no escaping, parameter binding, allow-list or schema check on the way. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
250
|
+
- Not a problem when: The value is a constant, or is built only from constants and your own config. A check on the way makes it safe: a parameterised query, an escaping helper, an allow-list, a validator that rejects anything unexpected. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
251
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/611
|
|
194
252
|
- Page: https://lintsure.com/rules/xml-external-entities
|
|
195
253
|
|
|
196
254
|
## deps.unpinned-version
|
|
@@ -199,6 +257,9 @@
|
|
|
199
257
|
- Controls: owasp-top10 A03:2025 (Software Supply Chain Failures); cra Annex I Part II (1) (Components identified, including an SBOM); owasp-llm LLM04:2026 (Supply Chain)
|
|
200
258
|
- Fix: Pin a version or a range in package.json and commit the lockfile, so every install gets the code you tested.
|
|
201
259
|
- Note: "*" or "latest" installs whatever is published next, including a compromised release (CWE-1357).
|
|
260
|
+
- Real only when: The dependency is installed with no version, a wildcard or latest. No lockfile fixes the version for the build that ships. The install runs in a build or deploy, not only on a developer's machine.
|
|
261
|
+
- Not a problem when: A committed lockfile pins the exact version and the build installs from it. The line is in documentation or an example command. It is a tool run once by a developer, never part of the build.
|
|
262
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/1357
|
|
202
263
|
- Page: https://lintsure.com/rules/deps-unpinned-version
|
|
203
264
|
|
|
204
265
|
## deps.install-script
|
|
@@ -207,32 +268,44 @@
|
|
|
207
268
|
- Controls: owasp-top10 A03:2025 (Software Supply Chain Failures); cra Annex I Part II (1) (Components identified, including an SBOM); owasp-llm LLM04:2026 (Supply Chain)
|
|
208
269
|
- Fix: Avoid downloading and running code in preinstall or postinstall. Vendor the file or document a manual step.
|
|
209
270
|
- Note: Code fetched at install time isn't pinned or reviewed and runs with the installer's permissions (CWE-829).
|
|
271
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
272
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
273
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/829
|
|
210
274
|
- Page: https://lintsure.com/rules/deps-install-script
|
|
211
275
|
|
|
212
276
|
## agent.config-runs-remote-code
|
|
213
277
|
**Agent config downloads and runs code** · status when found: gap · risk: high
|
|
214
278
|
|
|
215
|
-
- Controls: owasp-top10 A03:2025 (Software Supply Chain Failures)
|
|
279
|
+
- Controls: owasp-top10 A03:2025 (Software Supply Chain Failures); owasp-ast AST02 (Supply Chain Compromise)
|
|
216
280
|
- Fix: Don't download and run scripts from agent hooks, MCP server commands or editor tasks. Pin a reviewed local script or a versioned package instead, and review changes to these files like code.
|
|
217
281
|
- Note: Agents run these commands on their own, often at startup, with your user's permissions. A changed URL or script runs on every machine that opens the repo (CWE-829, CWE-494).
|
|
282
|
+
- Real only when: An agent or model will read or run this: the file is where the agent looks, or the call is in code that ships. The text or input is used as written: it is an instruction or a live value, not a quoted example or a warning about one. A person does not see or approve the step before it takes effect.
|
|
283
|
+
- Not a problem when: The file is a detector, a test set or documentation that lists these patterns to catch or explain them. It is the stated job of the skill or tool, and the user is asked before it happens. A limit set elsewhere applies: the agent's own permission prompts, an output cap, a sandbox.
|
|
284
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/829 https://www.opencre.org/node/standard/CWE/sectionid/494
|
|
218
285
|
- Seen in a real incident: CVE-2025-59536: commands in a cloned repo's Claude Code project settings ran when it was opened (Check Point Research) (https://research.checkpoint.com/2026/rce-and-api-token-exfiltration-through-claude-code-project-files-cve-2025-59536/)
|
|
219
286
|
- Page: https://lintsure.com/rules/agent-config-runs-remote-code
|
|
220
287
|
|
|
221
288
|
## agent.instructions-unsafe
|
|
222
289
|
**Agent instructions that override, hide or download and run** · status when found: gap · risk: high
|
|
223
290
|
|
|
224
|
-
- Controls: owasp-top10 A03:2025 (Software Supply Chain Failures); owasp-llm LLM01:2026 (Prompt Injection)
|
|
291
|
+
- Controls: owasp-top10 A03:2025 (Software Supply Chain Failures); owasp-llm LLM01:2026 (Prompt Injection); owasp-ast AST01 (Malicious Skills); owasp-ast AST04 (Insecure Metadata)
|
|
225
292
|
- Fix: Remove the line, or rewrite it so the agent asks the user first. Install tools with a pinned, reviewed command instead of piping a download into a shell, and never tell an agent to keep something from the user.
|
|
226
|
-
- Note: Agents read these files as instructions and act on them with your permissions. Gap when the line overrides earlier instructions, hides something from the user or sends secrets out. Partial when it downloads and runs a script, which some setup guides do on purpose (CWE-829, OWASP LLM01).
|
|
293
|
+
- Note: Agents read these files as instructions and act on them with your permissions. Gap when the line overrides earlier instructions, hides something from the user, carries characters a person can't see, or sends secrets out. Partial when it downloads and runs a script, which some setup guides do on purpose (CWE-829, OWASP LLM01).
|
|
294
|
+
- Real only when: The file is one an agent reads as its own instructions. The line tells the agent to drop earlier instructions, hide something from the user, send secrets out, or download and run a script. It is written as an instruction, not quoted as an example of an attack.
|
|
295
|
+
- Not a problem when: The line warns about the phrase or tells the agent to refuse it. The file is a detector's test data or documentation about prompt injection. A download-and-run line is a documented installer for a tool you chose, from a source you trust and pin.
|
|
296
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/829
|
|
227
297
|
- When Partial, Lintsure can't see: Lintsure reads the line, not who wrote it or whether the file came from a trusted skill. Check where this file came from before an agent uses it.
|
|
228
298
|
- Page: https://lintsure.com/rules/agent-instructions-unsafe
|
|
229
299
|
|
|
230
300
|
## agent.permissions-allow-all
|
|
231
301
|
**Agent settings that skip every permission prompt** · status when found: gap · risk: high
|
|
232
302
|
|
|
233
|
-
- Controls: owasp-top10 A02:2025 (Security Misconfiguration); owasp-llm LLM03:2026 (Excessive Agency)
|
|
303
|
+
- Controls: owasp-top10 A02:2025 (Security Misconfiguration); owasp-llm LLM03:2026 (Excessive Agency); owasp-ast AST03 (Over-Privileged Skills)
|
|
234
304
|
- Fix: Remove the bypass from the shared project file. Allow the few commands you trust by name (for example Bash(npm test)), and keep wider permissions in your own local settings, not in the repo.
|
|
235
305
|
- Note: Committed agent settings apply to everyone who opens the repo with that agent. Skipping prompts or allowing every shell command lets a bad instruction, a poisoned file or a mistake run without a person seeing it (CWE-250, OWASP LLM03 Excessive Agency).
|
|
306
|
+
- Real only when: An agent or model will read or run this: the file is where the agent looks, or the call is in code that ships. The text or input is used as written: it is an instruction or a live value, not a quoted example or a warning about one. A person does not see or approve the step before it takes effect.
|
|
307
|
+
- Not a problem when: The file is a detector, a test set or documentation that lists these patterns to catch or explain them. It is the stated job of the skill or tool, and the user is asked before it happens. A limit set elsewhere applies: the agent's own permission prompts, an output cap, a sandbox.
|
|
308
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/250
|
|
236
309
|
- Page: https://lintsure.com/rules/agent-permissions-allow-all
|
|
237
310
|
|
|
238
311
|
## ci.action-unpinned
|
|
@@ -241,6 +314,9 @@
|
|
|
241
314
|
- Controls: owasp-top10 A03:2025 (Software Supply Chain Failures); cra Annex I Part II (7) (Updates distributed securely)
|
|
242
315
|
- Fix: Pin third-party actions to a full commit SHA, with the version as a comment, for example uses: owner/action@<40-character sha> # v2.
|
|
243
316
|
- Note: A tag like @v1 can be moved by the action's owner, or by whoever takes over their account (CWE-829).
|
|
317
|
+
- Real only when: The action is third-party: not from actions/, github/ or your own organisation. It is pinned to a tag or a branch, which its owner can move, not to a full commit SHA. The job that uses it has secrets, a write token or a deploy step within reach.
|
|
318
|
+
- Not a problem when: The action belongs to your own organisation or is vendored in this repo. The job has no secrets and a read-only token, and nothing it produces is published. A policy outside the file pins or allow-lists actions for the whole organisation.
|
|
319
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/829
|
|
244
320
|
- Seen in a real incident: CVE-2025-30066: tj-actions/changed-files tags were moved to a malicious commit that printed CI secrets to logs (CISA alert) (https://www.cisa.gov/news-events/alerts/2025/03/18/supply-chain-compromise-third-party-tj-actionschanged-files-cve-2025-30066-and-reviewdogaction)
|
|
245
321
|
- Page: https://lintsure.com/rules/ci-action-unpinned
|
|
246
322
|
|
|
@@ -250,6 +326,9 @@
|
|
|
250
326
|
- Controls: owasp-top10 A03:2025 (Software Supply Chain Failures); owasp-top10 A08:2025 (Software or Data Integrity Failures); cra Annex I Part II (7) (Updates distributed securely)
|
|
251
327
|
- Fix: Use the pull_request trigger for workflows that build or run code from a pull request. If you need pull_request_target, never check out the pull request's code in it.
|
|
252
328
|
- Note: pull_request_target runs with your repository's secrets; checking out the contributor's code lets a pull request run with them (CWE-829).
|
|
329
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
330
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
331
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/829
|
|
253
332
|
- Page: https://lintsure.com/rules/ci-prt-checkout-head
|
|
254
333
|
|
|
255
334
|
## crypto.weak-random-token
|
|
@@ -258,6 +337,9 @@
|
|
|
258
337
|
- Controls: owasp-top10 A04:2025 (Cryptographic Failures); cra Annex I Part I (2)(e) (Confidentiality of data)
|
|
259
338
|
- Fix: Use crypto.randomBytes or crypto.randomUUID in Node, or the secrets module in Python, for tokens, codes and IDs people shouldn't guess.
|
|
260
339
|
- Note: Math.random and Python's random module are predictable; tokens made with them can be guessed (CWE-338).
|
|
340
|
+
- Real only when: The flagged line does what the finding says, in code or config that is in effect. Nothing nearby or elsewhere cancels it out. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
341
|
+
- Not a problem when: A stronger setting elsewhere takes effect over this one. The line only runs outside production. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
342
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/338
|
|
261
343
|
- Page: https://lintsure.com/rules/crypto-weak-random-token
|
|
262
344
|
|
|
263
345
|
## crypto.weak-cipher
|
|
@@ -266,14 +348,20 @@
|
|
|
266
348
|
- Controls: owasp-top10 A04:2025 (Cryptographic Failures); cra Annex I Part I (2)(e) (Confidentiality of data)
|
|
267
349
|
- Fix: Use AES-256-GCM or ChaCha20-Poly1305 with a random nonce, through a maintained library. Replace createCipher with createCipheriv.
|
|
268
350
|
- Note: DES, RC4 and ECB mode can be broken or leak patterns in the data; createCipher derives a weak key and IV (CWE-327).
|
|
351
|
+
- Real only when: The flagged line does what the finding says, in code or config that is in effect. Nothing nearby or elsewhere cancels it out. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
352
|
+
- Not a problem when: A stronger setting elsewhere takes effect over this one. The line only runs outside production. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
353
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/327
|
|
269
354
|
- Page: https://lintsure.com/rules/crypto-weak-cipher
|
|
270
355
|
|
|
271
356
|
## jwt.unverified
|
|
272
357
|
**JWT accepted without checking its signature** · status when found: gap · risk: high · medium confidence (shown with --all)
|
|
273
358
|
|
|
274
|
-
- Controls: owasp-top10 A04:2025 (Cryptographic Failures); owasp-top10 A07:2025 (Authentication Failures); cra Annex I Part I (2)(d) (Protection from unauthorised access)
|
|
359
|
+
- Controls: owasp-top10 A04:2025 (Cryptographic Failures); owasp-top10 A07:2025 (Authentication Failures); cra Annex I Part I (2)(d) (Protection from unauthorised access); owasp-api API2:2023 (Broken Authentication)
|
|
275
360
|
- Fix: Verify tokens with jwt.verify (Node) or jwt.decode with a key and an explicit algorithms list (Python). Never allow the 'none' algorithm.
|
|
276
361
|
- Note: Without signature checks anyone can write their own token and claim to be any user (CWE-347).
|
|
362
|
+
- Real only when: The token's contents are used to decide who the caller is or what they may do. The signature is not verified anywhere before that use. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
363
|
+
- Not a problem when: The decode only reads a header or a claim to pick the key, and a verify call follows. The token was already verified by the framework, a gateway or the auth library before this line. The decode runs in the browser to show a name or an expiry, and the server verifies on every request.
|
|
364
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/347
|
|
277
365
|
- Page: https://lintsure.com/rules/jwt-unverified
|
|
278
366
|
|
|
279
367
|
## cmd.shell-built
|
|
@@ -282,6 +370,9 @@
|
|
|
282
370
|
- Controls: owasp-top10 A05:2025 (Injection); cra Annex I Part I (2)(f) (Integrity of data and programs); cwe-top25 CWE-78 (OS Command Injection); cwe-top25 CWE-77 (Command Injection)
|
|
283
371
|
- Fix: Pass arguments as an array (execFile, spawn, subprocess.run([...])) instead of building a command string, and never use shell=True with outside input.
|
|
284
372
|
- Note: Characters like ; or $( ) in an inserted value run extra commands (OS command injection, CWE-78). Partial when the value may be fixed text from your own code.
|
|
373
|
+
- Real only when: The value comes from outside your code: a request, a form, a file upload, a model's answer or another service. It reaches the flagged call unchanged, with no escaping, parameter binding, allow-list or schema check on the way. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
374
|
+
- Not a problem when: The value is a constant, or is built only from constants and your own config. A check on the way makes it safe: a parameterised query, an escaping helper, an allow-list, a validator that rejects anything unexpected. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
375
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/78 https://www.opencre.org/node/standard/CWE/sectionid/77
|
|
285
376
|
- Page: https://lintsure.com/rules/cmd-shell-built
|
|
286
377
|
|
|
287
378
|
## code.eval
|
|
@@ -290,6 +381,9 @@
|
|
|
290
381
|
- Controls: owasp-top10 A05:2025 (Injection); cra Annex I Part I (2)(f) (Integrity of data and programs); cwe-top25 CWE-94 (Code Injection)
|
|
291
382
|
- Fix: Avoid eval and new Function. Parse data with JSON.parse or a real parser, and map names to functions with a lookup table.
|
|
292
383
|
- Note: If any part of the string comes from outside, it runs as your code (code injection, CWE-94). Partial when the input isn't visible on the line.
|
|
384
|
+
- Real only when: The value comes from outside your code: a request, a form, a file upload, a model's answer or another service. It reaches the flagged call unchanged, with no escaping, parameter binding, allow-list or schema check on the way. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
385
|
+
- Not a problem when: The value is a constant, or is built only from constants and your own config. A check on the way makes it safe: a parameterised query, an escaping helper, an allow-list, a validator that rejects anything unexpected. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
386
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/94
|
|
293
387
|
- Page: https://lintsure.com/rules/code-eval
|
|
294
388
|
|
|
295
389
|
## xss.raw-html
|
|
@@ -298,6 +392,9 @@
|
|
|
298
392
|
- Controls: owasp-top10 A05:2025 (Injection); cra Annex I Part I (2)(f) (Integrity of data and programs); cwe-top25 CWE-79 (Cross-site Scripting)
|
|
299
393
|
- Fix: Set text with textContent, let your framework escape values, or sanitise with DOMPurify before inserting HTML.
|
|
300
394
|
- Note: If the HTML contains user input, attackers can run scripts in your users' browsers (cross-site scripting, CWE-79). Partial because fixed HTML from your own code is safe.
|
|
395
|
+
- Real only when: The value comes from outside your code: a request, a form, a file upload, a model's answer or another service. It reaches the flagged call unchanged, with no escaping, parameter binding, allow-list or schema check on the way. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
396
|
+
- Not a problem when: The value is a constant, or is built only from constants and your own config. A check on the way makes it safe: a parameterised query, an escaping helper, an allow-list, a validator that rejects anything unexpected. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
397
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/79
|
|
301
398
|
- Page: https://lintsure.com/rules/xss-raw-html
|
|
302
399
|
|
|
303
400
|
## template.user-string
|
|
@@ -306,6 +403,9 @@
|
|
|
306
403
|
- Controls: owasp-top10 A05:2025 (Injection); cra Annex I Part I (2)(f) (Integrity of data and programs); cwe-top25 CWE-79 (Cross-site Scripting); cwe-top25 CWE-94 (Code Injection)
|
|
307
404
|
- Fix: Render a fixed template file and pass user values as variables, never as part of the template text.
|
|
308
405
|
- Note: Template syntax in user input runs on your server (server-side template injection, CWE-94).
|
|
406
|
+
- Real only when: The value comes from outside your code: a request, a form, a file upload, a model's answer or another service. It reaches the flagged call unchanged, with no escaping, parameter binding, allow-list or schema check on the way. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
407
|
+
- Not a problem when: The value is a constant, or is built only from constants and your own config. A check on the way makes it safe: a parameterised query, an escaping helper, an allow-list, a validator that rejects anything unexpected. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
408
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/79 https://www.opencre.org/node/standard/CWE/sectionid/94
|
|
309
409
|
- Page: https://lintsure.com/rules/template-user-string
|
|
310
410
|
|
|
311
411
|
## nosql.operator-input
|
|
@@ -314,38 +414,53 @@
|
|
|
314
414
|
- Controls: owasp-top10 A05:2025 (Injection); cra Annex I Part I (2)(f) (Integrity of data and programs); cwe-top25 CWE-20 (Improper Input Validation)
|
|
315
415
|
- Fix: Build the query from the specific fields you expect, and convert them to the expected types, so operators like $ne or $gt can't be injected.
|
|
316
416
|
- Note: A body such as {"password": {"$ne": null}} can match any record (NoSQL injection, CWE-943).
|
|
417
|
+
- Real only when: The value comes from outside your code: a request, a form, a file upload, a model's answer or another service. It reaches the flagged call unchanged, with no escaping, parameter binding, allow-list or schema check on the way. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
418
|
+
- Not a problem when: The value is a constant, or is built only from constants and your own config. A check on the way makes it safe: a parameterised query, an escaping helper, an allow-list, a validator that rejects anything unexpected. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
419
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/20 https://www.opencre.org/node/standard/CWE/sectionid/943
|
|
317
420
|
- Page: https://lintsure.com/rules/nosql-operator-input
|
|
318
421
|
|
|
319
422
|
## upload.unrestricted
|
|
320
423
|
**File upload with no type or size limit** · status when found: partial · risk: medium
|
|
321
424
|
|
|
322
|
-
- Controls: owasp-top10 A06:2025 (Insecure Design); cra Annex I Part I (2)(j) (Limited attack surface); cwe-top25 CWE-434 (Unrestricted Upload of File with Dangerous Type)
|
|
425
|
+
- Controls: owasp-top10 A06:2025 (Insecure Design); cra Annex I Part I (2)(j) (Limited attack surface); cwe-top25 CWE-434 (Unrestricted Upload of File with Dangerous Type); owasp-api API4:2023 (Unrestricted Resource Consumption)
|
|
323
426
|
- Fix: Set limits.fileSize and a fileFilter that allows only the types you need, store uploads outside the web root, and give them new names.
|
|
324
427
|
- Note: Unlimited uploads let people fill your disk or upload files that later run or are served as pages (CWE-434).
|
|
428
|
+
- Real only when: The value comes from outside your code: a request, a form, a file upload, a model's answer or another service. It reaches the flagged call unchanged, with no escaping, parameter binding, allow-list or schema check on the way. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
429
|
+
- Not a problem when: The value is a constant, or is built only from constants and your own config. A check on the way makes it safe: a parameterised query, an escaping helper, an allow-list, a validator that rejects anything unexpected. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
430
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/434
|
|
325
431
|
- Page: https://lintsure.com/rules/upload-unrestricted
|
|
326
432
|
|
|
327
433
|
## mass-assignment
|
|
328
434
|
**Whole request body saved to a model** · status when found: partial · risk: medium · medium confidence (shown with --all)
|
|
329
435
|
|
|
330
|
-
- Controls: owasp-top10 A06:2025 (Insecure Design); owasp-top10 A08:2025 (Software or Data Integrity Failures); cra Annex I Part I (2)(f) (Integrity of data and programs); cwe-top25 CWE-20 (Improper Input Validation); cwe-top25 CWE-639 (Authorization Bypass Through User-Controlled Key)
|
|
436
|
+
- Controls: owasp-top10 A06:2025 (Insecure Design); owasp-top10 A08:2025 (Software or Data Integrity Failures); cra Annex I Part I (2)(f) (Integrity of data and programs); cwe-top25 CWE-20 (Improper Input Validation); cwe-top25 CWE-639 (Authorization Bypass Through User-Controlled Key); owasp-api API3:2023 (Broken Object Property Level Authorization)
|
|
331
437
|
- Fix: Copy only the fields a user may change, for example with a schema (zod, pydantic) that lists them.
|
|
332
438
|
- Note: Users can set fields you didn't expect, such as role or isAdmin (mass assignment, CWE-915).
|
|
439
|
+
- Real only when: The flagged line does what the finding says, in code or config that is in effect. Nothing nearby or elsewhere cancels it out. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
440
|
+
- Not a problem when: A stronger setting elsewhere takes effect over this one. The line only runs outside production. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
441
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/20 https://www.opencre.org/node/standard/CWE/sectionid/639 https://www.opencre.org/node/standard/CWE/sectionid/915
|
|
333
442
|
- Page: https://lintsure.com/rules/mass-assignment
|
|
334
443
|
|
|
335
444
|
## auth.hardcoded-password
|
|
336
445
|
**Password written in the code** · status when found: partial · risk: high · medium confidence (shown with --all)
|
|
337
446
|
|
|
338
|
-
- Controls: owasp-top10 A07:2025 (Authentication Failures); cra Annex I Part I (2)(d) (Protection from unauthorised access)
|
|
447
|
+
- Controls: owasp-top10 A07:2025 (Authentication Failures); cra Annex I Part I (2)(d) (Protection from unauthorised access); owasp-api API2:2023 (Broken Authentication)
|
|
339
448
|
- Fix: Load passwords from environment variables or a secret manager, and rotate any that were committed.
|
|
340
449
|
- Note: Anyone with the code has the password, and it can't be changed without a release (CWE-259, CWE-798).
|
|
450
|
+
- Real only when: The value is a working credential, or the place where one will be put: long, random-looking, or with a provider's prefix. Code that runs for users reads it, or it is in a file that gets committed or shipped. Nothing replaces it before it is used: no environment variable or secret store overrides it in production.
|
|
451
|
+
- Not a problem when: It is a placeholder or an example: a made-up value, a documented test key, or text that only describes a key. It is public by design, such as a publishable or anon key meant for the browser. It is a fallback for local development only, and production fails to start without the real one.
|
|
452
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/259 https://www.opencre.org/node/standard/CWE/sectionid/798
|
|
341
453
|
- Page: https://lintsure.com/rules/auth-hardcoded-password
|
|
342
454
|
|
|
343
455
|
## jwt.no-expiry
|
|
344
456
|
**JWT signed without an expiry** · status when found: partial · risk: medium · medium confidence (shown with --all)
|
|
345
457
|
|
|
346
|
-
- Controls: owasp-top10 A07:2025 (Authentication Failures); cra Annex I Part I (2)(d) (Protection from unauthorised access)
|
|
458
|
+
- Controls: owasp-top10 A07:2025 (Authentication Failures); cra Annex I Part I (2)(d) (Protection from unauthorised access); owasp-api API2:2023 (Broken Authentication)
|
|
347
459
|
- Fix: Add expiresIn (Node) or an exp claim (Python), and keep access tokens short-lived.
|
|
348
460
|
- Note: A stolen token without an expiry works forever (insufficient session expiration, CWE-613). Partial because the expiry may be set in a payload built elsewhere.
|
|
461
|
+
- Real only when: Someone who should not have access can reach this code path: the endpoint, table or function is exposed. Nothing earlier enforces the check: no middleware, gateway, database policy or wrapper covers this path. What it guards matters: other people's data, an account, money, or an action with lasting effect.
|
|
462
|
+
- Not a problem when: The check exists somewhere else that covers this path, and you can name the file and line. The data or action is public on purpose. The line only runs outside production, inside a branch that checks the environment. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
463
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/613
|
|
349
464
|
- Page: https://lintsure.com/rules/jwt-no-expiry
|
|
350
465
|
|
|
351
466
|
## deserialize.unsafe
|
|
@@ -354,6 +469,9 @@
|
|
|
354
469
|
- Controls: owasp-top10 A08:2025 (Software or Data Integrity Failures); cra Annex I Part I (2)(f) (Integrity of data and programs); cwe-top25 CWE-502 (Deserialization of Untrusted Data)
|
|
355
470
|
- Fix: Use JSON for data from outside. In Python use yaml.safe_load, never pickle or marshal on untrusted data.
|
|
356
471
|
- Note: Deserialising untrusted data with these functions can run attacker code on your server (CWE-502).
|
|
472
|
+
- Real only when: The value comes from outside your code: a request, a form, a file upload, a model's answer or another service. It reaches the flagged call unchanged, with no escaping, parameter binding, allow-list or schema check on the way. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
473
|
+
- Not a problem when: The value is a constant, or is built only from constants and your own config. A check on the way makes it safe: a parameterised query, an escaping helper, an allow-list, a validator that rejects anything unexpected. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
474
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/502
|
|
357
475
|
- Page: https://lintsure.com/rules/deserialize-unsafe
|
|
358
476
|
|
|
359
477
|
## html.script-no-sri
|
|
@@ -362,14 +480,20 @@
|
|
|
362
480
|
- Controls: owasp-top10 A08:2025 (Software or Data Integrity Failures); cra Annex I Part I (2)(f) (Integrity of data and programs)
|
|
363
481
|
- Fix: Add integrity and crossorigin attributes with the file's hash, or host the file yourself.
|
|
364
482
|
- Note: If the CDN or package is compromised, the changed script runs on your site (CWE-353, CWE-829).
|
|
483
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
484
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
485
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/353 https://www.opencre.org/node/standard/CWE/sectionid/829
|
|
365
486
|
- Page: https://lintsure.com/rules/html-script-no-sri
|
|
366
487
|
|
|
367
488
|
## cookie.trusted-role
|
|
368
489
|
**Permissions read from a cookie** · status when found: partial · risk: high
|
|
369
490
|
|
|
370
|
-
- Controls: owasp-top10 A08:2025 (Software or Data Integrity Failures); owasp-top10 A01:2025 (Broken Access Control); cra Annex I Part I (2)(d) (Protection from unauthorised access); cwe-top25 CWE-863 (Incorrect Authorization)
|
|
491
|
+
- Controls: owasp-top10 A08:2025 (Software or Data Integrity Failures); owasp-top10 A01:2025 (Broken Access Control); cra Annex I Part I (2)(d) (Protection from unauthorised access); cwe-top25 CWE-863 (Incorrect Authorization); owasp-api API5:2023 (Broken Function Level Authorization)
|
|
371
492
|
- Fix: Keep roles and permissions on the server, looked up from the authenticated user, not in a cookie the browser can change.
|
|
372
493
|
- Note: Users can edit their own cookies and give themselves admin rights (CWE-565).
|
|
494
|
+
- Real only when: Someone who should not have access can reach this code path: the endpoint, table or function is exposed. Nothing earlier enforces the check: no middleware, gateway, database policy or wrapper covers this path. What it guards matters: other people's data, an account, money, or an action with lasting effect.
|
|
495
|
+
- Not a problem when: The check exists somewhere else that covers this path, and you can name the file and line. The data or action is public on purpose. The line only runs outside production, inside a branch that checks the environment. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
496
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/863 https://www.opencre.org/node/standard/CWE/sectionid/565
|
|
373
497
|
- Page: https://lintsure.com/rules/cookie-trusted-role
|
|
374
498
|
|
|
375
499
|
## log.secret
|
|
@@ -378,6 +502,9 @@
|
|
|
378
502
|
- Controls: owasp-top10 A09:2025 (Security Logging and Alerting Failures); cra Annex I Part I (2)(l) (Security logging); owasp-llm LLM02:2026 (Sensitive Information Disclosure); cwe-top25 CWE-200 (Exposure of Sensitive Information)
|
|
379
503
|
- Fix: Remove the value from the log call, or log only that it was present.
|
|
380
504
|
- Note: Logs are copied to many tools and people; a token in a log is a token anyone with log access can use (CWE-532).
|
|
505
|
+
- Real only when: The value is a working credential, or the place where one will be put: long, random-looking, or with a provider's prefix. Code that runs for users reads it, or it is in a file that gets committed or shipped. Nothing replaces it before it is used: no environment variable or secret store overrides it in production.
|
|
506
|
+
- Not a problem when: It is a placeholder or an example: a made-up value, a documented test key, or text that only describes a key. It is public by design, such as a publishable or anon key meant for the browser. It is a fallback for local development only, and production fails to start without the real one.
|
|
507
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/200 https://www.opencre.org/node/standard/CWE/sectionid/532
|
|
381
508
|
- Page: https://lintsure.com/rules/log-secret
|
|
382
509
|
|
|
383
510
|
## log.injection
|
|
@@ -386,6 +513,9 @@
|
|
|
386
513
|
- Controls: owasp-top10 A09:2025 (Security Logging and Alerting Failures); cra Annex I Part I (2)(l) (Security logging)
|
|
387
514
|
- Fix: Log specific, validated fields, and strip line breaks from user input before logging it.
|
|
388
515
|
- Note: Line breaks in user input can forge fake log entries and mislead an investigation (CWE-117).
|
|
516
|
+
- Real only when: The value comes from outside your code: a request, a form, a file upload, a model's answer or another service. It reaches the flagged call unchanged, with no escaping, parameter binding, allow-list or schema check on the way. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
517
|
+
- Not a problem when: The value is a constant, or is built only from constants and your own config. A check on the way makes it safe: a parameterised query, an escaping helper, an allow-list, a validator that rejects anything unexpected. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
518
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/117
|
|
389
519
|
- Page: https://lintsure.com/rules/log-injection
|
|
390
520
|
|
|
391
521
|
## error.empty-catch
|
|
@@ -394,22 +524,266 @@
|
|
|
394
524
|
- Controls: owasp-top10 A10:2025 (Mishandling of Exceptional Conditions)
|
|
395
525
|
- Fix: Handle the error, log it, or let it propagate. If ignoring it is deliberate, say why in a comment and catch only the specific error.
|
|
396
526
|
- Note: Silent failures hide attacks and bugs, and can leave the app running in a broken or unsafe state (CWE-390).
|
|
527
|
+
- Real only when: The flagged line does what the finding says, in code or config that is in effect. Nothing nearby or elsewhere cancels it out. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
528
|
+
- Not a problem when: A stronger setting elsewhere takes effect over this one. The line only runs outside production. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
529
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/390
|
|
397
530
|
- Page: https://lintsure.com/rules/error-empty-catch
|
|
398
531
|
|
|
399
532
|
## error.stack-to-client
|
|
400
533
|
**Error details sent to the user** · status when found: gap · risk: medium
|
|
401
534
|
|
|
402
|
-
- Controls: owasp-top10 A10:2025 (Mishandling of Exceptional Conditions); owasp-top10 A02:2025 (Security Misconfiguration); cra Annex I Part I (2)(j) (Limited attack surface); cwe-top25 CWE-200 (Exposure of Sensitive Information)
|
|
535
|
+
- Controls: owasp-top10 A10:2025 (Mishandling of Exceptional Conditions); owasp-top10 A02:2025 (Security Misconfiguration); cra Annex I Part I (2)(j) (Limited attack surface); cwe-top25 CWE-200 (Exposure of Sensitive Information); owasp-api API8:2023 (Security Misconfiguration)
|
|
403
536
|
- Fix: Log the full error on the server and send users a short, generic message with a reference id.
|
|
404
537
|
- Note: Stack traces show file paths, library versions and sometimes data, which helps attackers (CWE-209).
|
|
538
|
+
- Real only when: The flagged line does what the finding says, in code or config that is in effect. Nothing nearby or elsewhere cancels it out. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
539
|
+
- Not a problem when: A stronger setting elsewhere takes effect over this one. The line only runs outside production. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
540
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/200 https://www.opencre.org/node/standard/CWE/sectionid/209
|
|
405
541
|
- Page: https://lintsure.com/rules/error-stack-to-client
|
|
406
542
|
|
|
543
|
+
## crypto.static-iv
|
|
544
|
+
**Encryption with a fixed IV or nonce** · status when found: gap · risk: medium
|
|
545
|
+
|
|
546
|
+
- Controls: owasp-top10 A04:2025 (Cryptographic Failures); gdpr Art. 32 (Security of processing)
|
|
547
|
+
- Fix: Make a new random IV for every message (crypto.randomBytes, os.urandom, SecureRandom) and store it next to the ciphertext. It doesn't need to be secret, only never reused.
|
|
548
|
+
- Note: With the same key and the same IV, two messages can be compared and partly recovered. In AES-GCM a repeated nonce lets an attacker forge messages (CWE-329, CWE-323).
|
|
549
|
+
- Real only when: The flagged line does what the finding says, in code or config that is in effect. Nothing nearby or elsewhere cancels it out. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
550
|
+
- Not a problem when: A stronger setting elsewhere takes effect over this one. The line only runs outside production. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
551
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/329 https://www.opencre.org/node/standard/CWE/sectionid/323
|
|
552
|
+
- Page: https://lintsure.com/rules/crypto-static-iv
|
|
553
|
+
|
|
554
|
+
## crypto.weak-parameters
|
|
555
|
+
**Key size or work factor too low** · status when found: gap · risk: medium
|
|
556
|
+
|
|
557
|
+
- Controls: owasp-top10 A04:2025 (Cryptographic Failures); gdpr Art. 32 (Security of processing)
|
|
558
|
+
- Fix: Use RSA keys of 2048 bits or more, bcrypt with 10 rounds or more, and PBKDF2 with the iteration count current guidance gives (600,000 for SHA-256), or switch to Argon2.
|
|
559
|
+
- Note: Short keys can be factored and low work factors make stolen password hashes cheap to crack on ordinary hardware (CWE-326, CWE-916).
|
|
560
|
+
- Real only when: The flagged line does what the finding says, in code or config that is in effect. Nothing nearby or elsewhere cancels it out. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
561
|
+
- Not a problem when: A stronger setting elsewhere takes effect over this one. The line only runs outside production. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
562
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/326 https://www.opencre.org/node/standard/CWE/sectionid/916
|
|
563
|
+
- Page: https://lintsure.com/rules/crypto-weak-parameters
|
|
564
|
+
|
|
565
|
+
## mobile.debuggable-build
|
|
566
|
+
**Android release build that can be debugged** · status when found: gap · risk: medium
|
|
567
|
+
|
|
568
|
+
- Controls: owasp-top10 A02:2025 (Security Misconfiguration); gdpr Art. 32 (Security of processing)
|
|
569
|
+
- Fix: Remove android:debuggable from the manifest and keep debuggable false in the release build type. The build tools set it for debug builds on their own.
|
|
570
|
+
- Note: A debuggable app lets anyone with the phone attach a debugger, read its private files and change what it does (CWE-489).
|
|
571
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
572
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
573
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/489
|
|
574
|
+
- Page: https://lintsure.com/rules/mobile-debuggable-build
|
|
575
|
+
|
|
576
|
+
## privacy.consent-preticked
|
|
577
|
+
**Consent box that starts ticked** · status when found: gap · risk: medium
|
|
578
|
+
|
|
579
|
+
- Controls: gdpr Art. 7 (Conditions for consent)
|
|
580
|
+
- Fix: Start the box empty and let the person tick it. Store when they did and the wording they saw.
|
|
581
|
+
- Note: Consent has to be an active choice. A box that is ticked for the person is not consent under the GDPR, so anything sent on that basis has no legal ground (Art. 7, recital 32).
|
|
582
|
+
- Real only when: The field identifies a person, or is sensitive on its own: an email, a name, a phone number, an address, health or payment data. It leaves the place it belongs: into a log, a URL, an analytics tool, a third party or long-term storage. Nothing masks, hashes or removes it first, and no consent or stated need covers this use.
|
|
583
|
+
- Not a problem when: The value is masked, hashed or shortened before this line, in this file or by an imported helper. The field is an internal id or a label that says nothing about a person. It is test or seed data with made-up people. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
584
|
+
- When Partial, Lintsure can't see: Lintsure can't tell whether this box is the legal basis for anything. A ticked box for a setting the person already chose earlier is fine.
|
|
585
|
+
- Page: https://lintsure.com/rules/privacy-consent-preticked
|
|
586
|
+
|
|
587
|
+
## privacy.special-category-field
|
|
588
|
+
**Sensitive category of personal data stored** · status when found: partial · risk: medium
|
|
589
|
+
|
|
590
|
+
- Controls: gdpr Art. 9 (Special categories of personal data)
|
|
591
|
+
- Fix: Check that you need this field at all. If you do, write down the Art. 9 exception you rely on, usually explicit consent, and limit who can read it.
|
|
592
|
+
- Note: Religion, ethnicity, sexual orientation, political views, union membership, health and genetic data may not be processed unless a specific exception applies. Marked Partial: the exception is a decision outside the code.
|
|
593
|
+
- Real only when: The field identifies a person, or is sensitive on its own: an email, a name, a phone number, an address, health or payment data. It leaves the place it belongs: into a log, a URL, an analytics tool, a third party or long-term storage. Nothing masks, hashes or removes it first, and no consent or stated need covers this use.
|
|
594
|
+
- Not a problem when: The value is masked, hashed or shortened before this line, in this file or by an imported helper. The field is an internal id or a label that says nothing about a person. It is test or seed data with made-up people. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
595
|
+
- Page: https://lintsure.com/rules/privacy-special-category-field
|
|
596
|
+
|
|
597
|
+
## payment.card-code-stored
|
|
598
|
+
**Card security code stored** · status when found: gap · risk: high
|
|
599
|
+
|
|
600
|
+
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A02:2025 (Security Misconfiguration)
|
|
601
|
+
- Fix: Never store the card security code. Send the card straight to your payment provider and keep only the token it gives back.
|
|
602
|
+
- Note: The three or four digit code exists to prove the card is in the buyer's hand. Card scheme rules (PCI DSS 3.3.1) forbid keeping it after authorisation, even encrypted, and a leak makes every stored card usable.
|
|
603
|
+
- Real only when: The field identifies a person, or is sensitive on its own: an email, a name, a phone number, an address, health or payment data. It leaves the place it belongs: into a log, a URL, an analytics tool, a third party or long-term storage. Nothing masks, hashes or removes it first, and no consent or stated need covers this use.
|
|
604
|
+
- Not a problem when: The value is masked, hashed or shortened before this line, in this file or by an imported helper. The field is an internal id or a label that says nothing about a person. It is test or seed data with made-up people. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
605
|
+
- Page: https://lintsure.com/rules/payment-card-code-stored
|
|
606
|
+
|
|
607
|
+
## cloud.database-public
|
|
608
|
+
**Database reachable from the internet** · status when found: gap · risk: high
|
|
609
|
+
|
|
610
|
+
- Controls: owasp-top10 A01:2025 (Broken Access Control); owasp-top10 A02:2025 (Security Misconfiguration)
|
|
611
|
+
- Fix: Set publicly_accessible to false, put the database in a private subnet, and reach it through the app, a bastion or a VPN.
|
|
612
|
+
- Note: A database with a public address is one leaked or guessed password away from a full data breach, and it is found by scanners within hours (CWE-284).
|
|
613
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
614
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
615
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/284
|
|
616
|
+
- Page: https://lintsure.com/rules/cloud-database-public
|
|
617
|
+
|
|
618
|
+
## cloud.network-open
|
|
619
|
+
**Admin or database port open to the whole internet** · status when found: gap · risk: high
|
|
620
|
+
|
|
621
|
+
- Controls: owasp-top10 A01:2025 (Broken Access Control); owasp-top10 A02:2025 (Security Misconfiguration)
|
|
622
|
+
- Fix: Limit the rule to the addresses that need it (your office, a VPN, a bastion), or remove it and use a session manager.
|
|
623
|
+
- Note: Remote login and database ports that accept connections from 0.0.0.0/0 are scanned and attacked all day (CWE-284).
|
|
624
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
625
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
626
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/284
|
|
627
|
+
- When Partial, Lintsure can't see: Lintsure reads this file only. It can't see a network ACL or a firewall in front that narrows the rule.
|
|
628
|
+
- Page: https://lintsure.com/rules/cloud-network-open
|
|
629
|
+
|
|
630
|
+
## cloud.iam-allow-all
|
|
631
|
+
**Policy that allows every action on every resource** · status when found: gap · risk: high
|
|
632
|
+
|
|
633
|
+
- Controls: owasp-top10 A01:2025 (Broken Access Control); owasp-top10 A02:2025 (Security Misconfiguration)
|
|
634
|
+
- Fix: List the actions and resources the role really needs. Start from what it calls today and add as you go.
|
|
635
|
+
- Note: Whoever gets this role's credentials, through a leaked key or a compromised service, controls the whole account (CWE-732).
|
|
636
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
637
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
638
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/732
|
|
639
|
+
- Page: https://lintsure.com/rules/cloud-iam-allow-all
|
|
640
|
+
|
|
641
|
+
## cloud.function-url-no-auth
|
|
642
|
+
**Function URL that anyone can call** · status when found: partial · risk: medium
|
|
643
|
+
|
|
644
|
+
- Controls: owasp-top10 A01:2025 (Broken Access Control); owasp-top10 A07:2025 (Authentication Failures); owasp-api API5:2023 (Broken Function Level Authorization)
|
|
645
|
+
- Fix: Use AWS_IAM as the authorization type, or check a signature or token in the function before doing anything.
|
|
646
|
+
- Note: With authorization set to NONE the function runs for anyone who has the URL. Marked Partial: public webhooks do this on purpose and check a signature in code.
|
|
647
|
+
- Real only when: Someone who should not have access can reach this code path: the endpoint, table or function is exposed. Nothing earlier enforces the check: no middleware, gateway, database policy or wrapper covers this path. What it guards matters: other people's data, an account, money, or an action with lasting effect.
|
|
648
|
+
- Not a problem when: The check exists somewhere else that covers this path, and you can name the file and line. The data or action is public on purpose. The line only runs outside production, inside a branch that checks the environment. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
649
|
+
- Page: https://lintsure.com/rules/cloud-function-url-no-auth
|
|
650
|
+
|
|
651
|
+
## docker.runs-as-root
|
|
652
|
+
**Container image that runs as root** · status when found: partial · risk: low
|
|
653
|
+
|
|
654
|
+
- Controls: owasp-top10 A02:2025 (Security Misconfiguration)
|
|
655
|
+
- Fix: Add a user and switch to it in the last stage, for example `RUN adduser -D app` then `USER app`, or use a base image built to run without root.
|
|
656
|
+
- Note: With no USER line the app runs as root inside the container. A bug that lets someone run code then starts with full rights in the container, which makes breaking out to the host much easier (CWE-250). Marked Partial: the platform may set the user when it starts the container.
|
|
657
|
+
- Real only when: The image is the one that runs in production, not a build stage or a dev container. No USER line sets a non-root user in the final stage, and the base image runs as root. Nothing at run time sets the user: no runAsUser, no --user flag.
|
|
658
|
+
- Not a problem when: The base image already switches to a non-root user. The orchestrator sets the user or runs the container rootless, with evidence in its config. The Dockerfile is for local development or CI only.
|
|
659
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/250
|
|
660
|
+
- When Partial, Lintsure can't see: Lintsure can't see a user set at run time (Kubernetes runAsUser, docker run --user) or one the base image already sets.
|
|
661
|
+
- Page: https://lintsure.com/rules/docker-runs-as-root
|
|
662
|
+
|
|
663
|
+
## docker.image-unpinned
|
|
664
|
+
**Base image with no fixed version** · status when found: partial · risk: low
|
|
665
|
+
|
|
666
|
+
- Controls: owasp-top10 A08:2025 (Software or Data Integrity Failures)
|
|
667
|
+
- Fix: Name a version, for example `FROM node:22.11-slim`, and update it on purpose. Pin a digest for anything you ship to others.
|
|
668
|
+
- Note: With no tag, or `latest`, every build can pull a different image, so a broken or tampered release reaches you without any change in your repo (CWE-829).
|
|
669
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
670
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
671
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/829
|
|
672
|
+
- Page: https://lintsure.com/rules/docker-image-unpinned
|
|
673
|
+
|
|
674
|
+
## docker.copies-everything
|
|
675
|
+
**Whole project copied into the image with nothing kept out** · status when found: partial · risk: low
|
|
676
|
+
|
|
677
|
+
- Controls: owasp-top10 A02:2025 (Security Misconfiguration); owasp-top10 A08:2025 (Software or Data Integrity Failures)
|
|
678
|
+
- Fix: Add a .dockerignore next to the Dockerfile that lists .env files, .git and agent folders such as .claude and .cursor, or copy only the folders the app needs.
|
|
679
|
+
- Note: Whatever is copied stays in the image, where anyone who can pull it can read it. Local settings, keys in .env, git history and an agent's notes about the project are not meant to ship (CWE-538).
|
|
680
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
681
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
682
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/538
|
|
683
|
+
- When Partial, Lintsure can't see: Lintsure looked for a .dockerignore that mentions .env. It can't see what is on the build machine, or a build context that is narrower than the project.
|
|
684
|
+
- Page: https://lintsure.com/rules/docker-copies-everything
|
|
685
|
+
|
|
686
|
+
## privacy.memory-no-delete
|
|
687
|
+
**Agent memory that is written but never deleted** · status when found: partial · risk: low
|
|
688
|
+
|
|
689
|
+
- Controls: gdpr Art. 17 (Right to erasure); gdpr Art. 5(1)(e) (Storage limitation)
|
|
690
|
+
- Fix: Give users a way to see and delete what the agent remembers about them, and set how long memories are kept. Most memory libraries have a delete call per user: wire it to account deletion.
|
|
691
|
+
- Note: Memories are built from what people say, so they hold names, contacts, health and other personal details. Kept for good with no delete path, they can't be removed when a user asks or leaves (GDPR Art. 17).
|
|
692
|
+
- Real only when: The field identifies a person, or is sensitive on its own: an email, a name, a phone number, an address, health or payment data. It leaves the place it belongs: into a log, a URL, an analytics tool, a third party or long-term storage. Nothing masks, hashes or removes it first, and no consent or stated need covers this use.
|
|
693
|
+
- Not a problem when: The value is masked, hashed or shortened before this line, in this file or by an imported helper. The field is an internal id or a label that says nothing about a person. It is test or seed data with made-up people. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
694
|
+
- When Partial, Lintsure can't see: Lintsure looked in this file only. A delete call may live in another file, or the memory service may expire entries by itself.
|
|
695
|
+
- Page: https://lintsure.com/rules/privacy-memory-no-delete
|
|
696
|
+
|
|
697
|
+
## docker.secret-in-build
|
|
698
|
+
**Secret given a value in a Dockerfile** · status when found: gap · risk: high
|
|
699
|
+
|
|
700
|
+
- Controls: owasp-top10 A02:2025 (Security Misconfiguration); owasp-top10 A08:2025 (Software or Data Integrity Failures)
|
|
701
|
+
- Fix: Pass the secret when the container starts (an environment variable or a mounted secret), or use `RUN --mount=type=secret` for build steps. Rotate the value: it is in every image built so far.
|
|
702
|
+
- Note: ENV and ARG values are stored in the image. Anyone who can pull the image, or read its build history, can read the secret (CWE-798).
|
|
703
|
+
- Real only when: The value is a working credential, or the place where one will be put: long, random-looking, or with a provider's prefix. Code that runs for users reads it, or it is in a file that gets committed or shipped. Nothing replaces it before it is used: no environment variable or secret store overrides it in production.
|
|
704
|
+
- Not a problem when: It is a placeholder or an example: a made-up value, a documented test key, or text that only describes a key. It is public by design, such as a publishable or anon key meant for the browser. It is a fallback for local development only, and production fails to start without the real one.
|
|
705
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/798
|
|
706
|
+
- Page: https://lintsure.com/rules/docker-secret-in-build
|
|
707
|
+
|
|
708
|
+
## mcp.config-unsafe-server
|
|
709
|
+
**MCP server run from a moving version or over plain HTTP** · status when found: partial · risk: medium
|
|
710
|
+
|
|
711
|
+
- Controls: owasp-llm LLM04:2026 (Supply Chain); owasp-top10 A08:2025 (Software or Data Integrity Failures); owasp-ast AST02 (Supply Chain Compromise); owasp-ast AST07 (Update Drift)
|
|
712
|
+
- Fix: Pin the server to an exact version you have looked at, for example some-server@1.4.2, and update it on purpose. Use https for a remote server.
|
|
713
|
+
- Note: An agent trusts the tools this server offers. With no version, or @latest, the next start can load different code and different tool descriptions than the ones you approved. Over plain HTTP anyone on the network path can change them (OWASP LLM04, CWE-829).
|
|
714
|
+
- Real only when: An agent or model will read or run this: the file is where the agent looks, or the call is in code that ships. The text or input is used as written: it is an instruction or a live value, not a quoted example or a warning about one. A person does not see or approve the step before it takes effect.
|
|
715
|
+
- Not a problem when: The file is a detector, a test set or documentation that lists these patterns to catch or explain them. It is the stated job of the skill or tool, and the user is asked before it happens. A limit set elsewhere applies: the agent's own permission prompts, an output cap, a sandbox.
|
|
716
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/829
|
|
717
|
+
- When Partial, Lintsure can't see: Lintsure can't see whether a lockfile or a private registry pins this package somewhere else.
|
|
718
|
+
- Page: https://lintsure.com/rules/mcp-config-unsafe-server
|
|
719
|
+
|
|
720
|
+
## mcp.tool-description-poisoned
|
|
721
|
+
**MCP tool description that gives the agent orders** · status when found: gap · risk: high
|
|
722
|
+
|
|
723
|
+
- Controls: owasp-llm LLM01:2026 (Prompt Injection); owasp-llm LLM04:2026 (Supply Chain)
|
|
724
|
+
- Fix: Rewrite the description so it only says what the tool does and what it takes. Remove anything that tells the agent to ignore instructions, keep something from the user or read other files, and delete any invisible characters.
|
|
725
|
+
- Note: An agent reads tool descriptions as part of its instructions. A description that says to hide a step, ignore earlier rules or read key files can take over every agent that connects to this server (OWASP LLM01, CWE-1427).
|
|
726
|
+
- Real only when: An agent or model will read or run this: the file is where the agent looks, or the call is in code that ships. The text or input is used as written: it is an instruction or a live value, not a quoted example or a warning about one. A person does not see or approve the step before it takes effect.
|
|
727
|
+
- Not a problem when: The file is a detector, a test set or documentation that lists these patterns to catch or explain them. It is the stated job of the skill or tool, and the user is asked before it happens. A limit set elsewhere applies: the agent's own permission prompts, an output cap, a sandbox.
|
|
728
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/1427
|
|
729
|
+
- When Partial, Lintsure can't see: Lintsure reads this server's source, not the servers it connects to. It can't tell a real attack from a security tool that lists these phrases to detect them.
|
|
730
|
+
- Page: https://lintsure.com/rules/mcp-tool-description-poisoned
|
|
731
|
+
|
|
732
|
+
## skill.fetches-remote-instructions
|
|
733
|
+
**Skill tells the agent to follow a page on the internet** · status when found: partial · risk: medium
|
|
734
|
+
|
|
735
|
+
- Controls: owasp-ast AST05 (Untrusted External Instructions); owasp-llm LLM01:2026 (Prompt Injection)
|
|
736
|
+
- Fix: Put the steps in the skill itself, or keep a reviewed copy in the repo and point to that. If the page must be fetched, tell the agent to treat it as reference text and to ask before acting on it.
|
|
737
|
+
- Note: The skill was reviewed once, but the page can change at any time, and whoever controls it then decides what the agent does with your permissions (CWE-829).
|
|
738
|
+
- Real only when: An agent or model will read or run this: the file is where the agent looks, or the call is in code that ships. The text or input is used as written: it is an instruction or a live value, not a quoted example or a warning about one. A person does not see or approve the step before it takes effect.
|
|
739
|
+
- Not a problem when: The file is a detector, a test set or documentation that lists these patterns to catch or explain them. It is the stated job of the skill or tool, and the user is asked before it happens. A limit set elsewhere applies: the agent's own permission prompts, an output cap, a sandbox.
|
|
740
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/829
|
|
741
|
+
- When Partial, Lintsure can't see: Lintsure can't see what the page says today or who controls it, and it can't tell reference reading from instructions the agent will act on.
|
|
742
|
+
- Page: https://lintsure.com/rules/skill-fetches-remote-instructions
|
|
743
|
+
|
|
744
|
+
## skill.writes-agent-memory
|
|
745
|
+
**Skill changes the agent's own instructions or settings** · status when found: partial · risk: medium
|
|
746
|
+
|
|
747
|
+
- Controls: owasp-ast AST01 (Malicious Skills); owasp-ast AST03 (Over-Privileged Skills)
|
|
748
|
+
- Fix: Have the skill show the change and ask the user before writing to these files. If writing them is not the skill's stated job, remove the line.
|
|
749
|
+
- Note: AGENTS.md, CLAUDE.md, memory files and agent settings are read at the start of every later session. A skill that writes to them keeps its influence after it has finished, and can loosen limits for everything that follows.
|
|
750
|
+
- Real only when: An agent or model will read or run this: the file is where the agent looks, or the call is in code that ships. The text or input is used as written: it is an instruction or a live value, not a quoted example or a warning about one. A person does not see or approve the step before it takes effect.
|
|
751
|
+
- Not a problem when: The file is a detector, a test set or documentation that lists these patterns to catch or explain them. It is the stated job of the skill or tool, and the user is asked before it happens. A limit set elsewhere applies: the agent's own permission prompts, an output cap, a sandbox.
|
|
752
|
+
- When Partial, Lintsure can't see: Lintsure can't tell a skill whose stated job is to manage these files, with the user's agreement, from one that changes them on the quiet.
|
|
753
|
+
- Page: https://lintsure.com/rules/skill-writes-agent-memory
|
|
754
|
+
|
|
755
|
+
## skill.unrestricted-shell
|
|
756
|
+
**Skill is allowed any shell command** · status when found: partial · risk: low
|
|
757
|
+
|
|
758
|
+
- Controls: owasp-ast AST03 (Over-Privileged Skills); owasp-llm LLM03:2026 (Excessive Agency)
|
|
759
|
+
- Fix: List the commands the skill needs, for example `Bash(npm run test:*)`, and leave the rest to the agent's normal permission prompts.
|
|
760
|
+
- Note: With the whole shell allowed, the skill's other limits mean little: any file can be read or changed and anything can be sent out through a command. One poisoned input to the skill then reaches the whole machine.
|
|
761
|
+
- Real only when: An agent or model will read or run this: the file is where the agent looks, or the call is in code that ships. The text or input is used as written: it is an instruction or a live value, not a quoted example or a warning about one. A person does not see or approve the step before it takes effect.
|
|
762
|
+
- Not a problem when: The file is a detector, a test set or documentation that lists these patterns to catch or explain them. It is the stated job of the skill or tool, and the user is asked before it happens. A limit set elsewhere applies: the agent's own permission prompts, an output cap, a sandbox.
|
|
763
|
+
- When Partial, Lintsure can't see: Lintsure can't see the agent's own settings, which may still ask before each command.
|
|
764
|
+
- Page: https://lintsure.com/rules/skill-unrestricted-shell
|
|
765
|
+
|
|
766
|
+
## mcp.server-binds-all-interfaces
|
|
767
|
+
**MCP server listens on every network interface** · status when found: partial · risk: medium
|
|
768
|
+
|
|
769
|
+
- Controls: owasp-ast AST06 (Weak Isolation); owasp-top10 A02:2025 (Security Misconfiguration)
|
|
770
|
+
- Fix: Listen on 127.0.0.1 unless other machines must reach the server. If they must, require sign-in on every request and put it behind a firewall.
|
|
771
|
+
- Note: An agent's tool server usually runs on a developer's machine. On 0.0.0.0, anyone on the same network can call its tools, which often read files and run commands (CWE-1327).
|
|
772
|
+
- Real only when: An agent or model will read or run this: the file is where the agent looks, or the call is in code that ships. The text or input is used as written: it is an instruction or a live value, not a quoted example or a warning about one. A person does not see or approve the step before it takes effect.
|
|
773
|
+
- Not a problem when: The file is a detector, a test set or documentation that lists these patterns to catch or explain them. It is the stated job of the skill or tool, and the user is asked before it happens. A limit set elsewhere applies: the agent's own permission prompts, an output cap, a sandbox.
|
|
774
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/1327
|
|
775
|
+
- When Partial, Lintsure can't see: Lintsure can't see a firewall, a container network or sign-in in front of this server.
|
|
776
|
+
- Page: https://lintsure.com/rules/mcp-server-binds-all-interfaces
|
|
777
|
+
|
|
407
778
|
## mcp.tool-runs-shell
|
|
408
779
|
**MCP tool that runs shell commands** · status when found: partial · risk: high
|
|
409
780
|
|
|
410
781
|
- Controls: owasp-llm LLM03:2026 (Excessive Agency); owasp-top10 A06:2025 (Insecure Design)
|
|
411
782
|
- Fix: Run a fixed program with execFile and an argument list, never a command string. Check every argument against an allow-list, and ask the user before anything that changes files or systems.
|
|
412
783
|
- Note: The agent decides what to pass to this tool, and anything it reads (a web page, an issue, a file) can steer it. If tool input reaches the command, a prompt injection becomes a shell on this machine (CWE-78).
|
|
784
|
+
- Real only when: An agent or model will read or run this: the file is where the agent looks, or the call is in code that ships. The text or input is used as written: it is an instruction or a live value, not a quoted example or a warning about one. A person does not see or approve the step before it takes effect.
|
|
785
|
+
- Not a problem when: The file is a detector, a test set or documentation that lists these patterns to catch or explain them. It is the stated job of the skill or tool, and the user is asked before it happens. A limit set elsewhere applies: the agent's own permission prompts, an output cap, a sandbox.
|
|
786
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/78
|
|
413
787
|
- When Partial, Lintsure can't see: Lintsure can't tell whether the tool's input reaches the command, or whether the command is fixed.
|
|
414
788
|
- Page: https://lintsure.com/rules/mcp-tool-runs-shell
|
|
415
789
|
|
|
@@ -419,32 +793,43 @@
|
|
|
419
793
|
- Controls: owasp-llm LLM03:2026 (Excessive Agency); owasp-top10 A01:2025 (Broken Access Control)
|
|
420
794
|
- Fix: Give the server a token with only the access its tools need, read-only where it can be. Split tools that write into a separate server or token.
|
|
421
795
|
- Note: Every tool in this server acts with this credential's full access, so the riskiest tool sets the blast radius for all of them. A separate key name doesn't narrow anything if the key itself can do more.
|
|
796
|
+
- Real only when: An agent or model will read or run this: the file is where the agent looks, or the call is in code that ships. The text or input is used as written: it is an instruction or a live value, not a quoted example or a warning about one. A person does not see or approve the step before it takes effect.
|
|
797
|
+
- Not a problem when: The file is a detector, a test set or documentation that lists these patterns to catch or explain them. It is the stated job of the skill or tool, and the user is asked before it happens. A limit set elsewhere applies: the agent's own permission prompts, an output cap, a sandbox.
|
|
422
798
|
- When Partial, Lintsure can't see: Lintsure can't see what this credential is allowed to do.
|
|
423
799
|
- Page: https://lintsure.com/rules/mcp-tool-uses-secret
|
|
424
800
|
|
|
425
801
|
## authz.no-owner-check
|
|
426
802
|
**Record loaded by an id from the request, with no owner check** · status when found: partial · risk: high · medium confidence (shown with --all)
|
|
427
803
|
|
|
428
|
-
- Controls: owasp-top10 A01:2025 (Broken Access Control)
|
|
804
|
+
- Controls: owasp-top10 A01:2025 (Broken Access Control); owasp-api API1:2023 (Broken Object Level Authorization)
|
|
429
805
|
- Fix: Look the record up by its id and the signed-in user (or tenant) together, for example where: { id, userId: req.user.id }, or check the owner before returning it.
|
|
430
806
|
- Note: Anyone who changes the id in the URL can read or change someone else's record (insecure direct object reference, CWE-639).
|
|
807
|
+
- Real only when: The record is looked up by an id the caller supplies. The query does not also filter by the signed-in user, their team or their tenant. The table holds records that belong to different users, and no database policy limits rows per user.
|
|
808
|
+
- Not a problem when: The query filters by the caller's own id, or the id comes from the session and not the request. Row level security or a tenant scope on the client enforces ownership for this table. The record is public, or the endpoint is for admins and checks the admin role.
|
|
809
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/639
|
|
431
810
|
- When Partial, Lintsure can't see: Lintsure can't see checks done in middleware or another function, so the owner may already be verified.
|
|
432
811
|
- Page: https://lintsure.com/rules/authz-no-owner-check
|
|
433
812
|
|
|
434
813
|
## jwt.no-algorithm-pin
|
|
435
814
|
**Token verified without saying which algorithm is allowed** · status when found: partial · risk: medium · medium confidence (shown with --all)
|
|
436
815
|
|
|
437
|
-
- Controls: owasp-top10 A07:2025 (Authentication Failures)
|
|
816
|
+
- Controls: owasp-top10 A07:2025 (Authentication Failures); owasp-api API2:2023 (Broken Authentication)
|
|
438
817
|
- Fix: Pass the algorithm you sign with, for example jwt.verify(token, key, { algorithms: ["RS256"] }), or algorithms=["HS256"] in PyJWT.
|
|
439
818
|
- Note: Without a fixed list, some library versions accept a token signed with a different algorithm than you meant, for example one signed with your public key (CWE-347).
|
|
819
|
+
- Real only when: Someone who should not have access can reach this code path: the endpoint, table or function is exposed. Nothing earlier enforces the check: no middleware, gateway, database policy or wrapper covers this path. What it guards matters: other people's data, an account, money, or an action with lasting effect.
|
|
820
|
+
- Not a problem when: The check exists somewhere else that covers this path, and you can name the file and line. The data or action is public on purpose. The line only runs outside production, inside a branch that checks the environment. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
821
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/347
|
|
440
822
|
- Page: https://lintsure.com/rules/jwt-no-algorithm-pin
|
|
441
823
|
|
|
442
824
|
## jwt.weak-secret
|
|
443
825
|
**Token signed with a short secret written in the code** · status when found: gap · risk: high
|
|
444
826
|
|
|
445
|
-
- Controls: owasp-top10 A04:2025 (Cryptographic Failures); owasp-top10 A07:2025 (Authentication Failures)
|
|
827
|
+
- Controls: owasp-top10 A04:2025 (Cryptographic Failures); owasp-top10 A07:2025 (Authentication Failures); owasp-api API2:2023 (Broken Authentication)
|
|
446
828
|
- Fix: Read the signing key from the environment or a secret store, and make it at least 32 random bytes.
|
|
447
829
|
- Note: Anyone who reads the code, or guesses a short key, can sign their own login tokens (CWE-798, CWE-521).
|
|
830
|
+
- Real only when: The value is a working credential, or the place where one will be put: long, random-looking, or with a provider's prefix. Code that runs for users reads it, or it is in a file that gets committed or shipped. Nothing replaces it before it is used: no environment variable or secret store overrides it in production.
|
|
831
|
+
- Not a problem when: It is a placeholder or an example: a made-up value, a documented test key, or text that only describes a key. It is public by design, such as a publishable or anon key meant for the browser. It is a fallback for local development only, and production fails to start without the real one.
|
|
832
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/798 https://www.opencre.org/node/standard/CWE/sectionid/521
|
|
448
833
|
- Page: https://lintsure.com/rules/jwt-weak-secret
|
|
449
834
|
|
|
450
835
|
## proto.pollution
|
|
@@ -453,6 +838,9 @@
|
|
|
453
838
|
- Controls: owasp-top10 A08:2025 (Software or Data Integrity Failures)
|
|
454
839
|
- Fix: Copy only the fields you expect, or validate the body with a schema first. If you must merge, drop __proto__, constructor and prototype keys.
|
|
455
840
|
- Note: A body like {"__proto__": {"isAdmin": true}} can change every object in the app (prototype pollution, CWE-1321).
|
|
841
|
+
- Real only when: The value comes from outside your code: a request, a form, a file upload, a model's answer or another service. It reaches the flagged call unchanged, with no escaping, parameter binding, allow-list or schema check on the way. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
842
|
+
- Not a problem when: The value is a constant, or is built only from constants and your own config. A check on the way makes it safe: a parameterised query, an escaping helper, an allow-list, a validator that rejects anything unexpected. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
843
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/1321
|
|
456
844
|
- Page: https://lintsure.com/rules/proto-pollution
|
|
457
845
|
|
|
458
846
|
## html.tabnabbing
|
|
@@ -461,6 +849,9 @@
|
|
|
461
849
|
- Controls: owasp-top10 A06:2025 (Insecure Design)
|
|
462
850
|
- Fix: Add rel="noopener noreferrer" to links with target="_blank".
|
|
463
851
|
- Note: Current browsers already treat target="_blank" as noopener, so this matters mainly for older browsers and webviews: the opened page could redirect your tab (CWE-1022).
|
|
852
|
+
- Real only when: The flagged line does what the finding says, in code or config that is in effect. Nothing nearby or elsewhere cancels it out. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
853
|
+
- Not a problem when: A stronger setting elsewhere takes effect over this one. The line only runs outside production. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
854
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/1022
|
|
464
855
|
- Page: https://lintsure.com/rules/html-tabnabbing
|
|
465
856
|
|
|
466
857
|
## ws.no-origin-check
|
|
@@ -469,6 +860,9 @@
|
|
|
469
860
|
- Controls: owasp-top10 A01:2025 (Broken Access Control)
|
|
470
861
|
- Fix: Check the Origin header when a connection opens (verifyClient in ws, cors.origin or allowRequest in socket.io) and allow only your own sites.
|
|
471
862
|
- Note: Browsers don't stop other sites opening a web socket to you, so a page on any site can use a signed-in visitor's cookies against it (cross-site WebSocket hijacking, CWE-1385).
|
|
863
|
+
- Real only when: Someone who should not have access can reach this code path: the endpoint, table or function is exposed. Nothing earlier enforces the check: no middleware, gateway, database policy or wrapper covers this path. What it guards matters: other people's data, an account, money, or an action with lasting effect.
|
|
864
|
+
- Not a problem when: The check exists somewhere else that covers this path, and you can name the file and line. The data or action is public on purpose. The line only runs outside production, inside a branch that checks the environment. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
865
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/1385
|
|
472
866
|
- When Partial, Lintsure can't see: Lintsure can't see an origin check done in a proxy or an upgrade handler in another file.
|
|
473
867
|
- Page: https://lintsure.com/rules/ws-no-origin-check
|
|
474
868
|
|
|
@@ -478,6 +872,9 @@
|
|
|
478
872
|
- Controls: owasp-top10 A02:2025 (Security Misconfiguration)
|
|
479
873
|
- Fix: Remove privileged, hostNetwork, hostPID and hostIPC, set allowPrivilegeEscalation: false, and run as a non-root user.
|
|
480
874
|
- Note: A privileged container, or one sharing the host's network or processes, can take over the machine it runs on if it is broken into (CWE-250).
|
|
875
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
876
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
877
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/250
|
|
481
878
|
- Page: https://lintsure.com/rules/k8s-privileged
|
|
482
879
|
|
|
483
880
|
## docker.socket-mounted
|
|
@@ -486,6 +883,9 @@
|
|
|
486
883
|
- Controls: owasp-top10 A02:2025 (Security Misconfiguration)
|
|
487
884
|
- Fix: Don't mount /var/run/docker.sock. If the container really needs Docker, point it at a separate, locked-down Docker daemon over TLS, or use a rootless or socket-proxy setup that allows only the calls it needs.
|
|
488
885
|
- Note: Whatever runs in the container gets the host's Docker, and with it the whole machine: it can start a privileged container that mounts the host's disk (CWE-250). Mounting it read-only (:ro) doesn't help, because the API still works.
|
|
886
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
887
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
888
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/250
|
|
489
889
|
- When Partial, Lintsure can't see: Lintsure can't tell whether this container is meant to manage Docker (a CI runner or a reverse proxy) or whether the host is a throwaway machine.
|
|
490
890
|
- Page: https://lintsure.com/rules/docker-socket-mounted
|
|
491
891
|
|
|
@@ -495,6 +895,9 @@
|
|
|
495
895
|
- Controls: owasp-top10 A01:2025 (Broken Access Control)
|
|
496
896
|
- Fix: Keep the bucket private and block public access. Share single files with short-lived signed URLs instead.
|
|
497
897
|
- Note: Anyone on the internet can list or download what's in a public bucket, and with write access, replace it (CWE-284).
|
|
898
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
899
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
900
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/284
|
|
498
901
|
- Page: https://lintsure.com/rules/cloud-public-bucket
|
|
499
902
|
|
|
500
903
|
## crypto.unsafe-compare
|
|
@@ -503,14 +906,20 @@
|
|
|
503
906
|
- Controls: owasp-top10 A04:2025 (Cryptographic Failures)
|
|
504
907
|
- Fix: Use crypto.timingSafeEqual (Node) or hmac.compare_digest (Python) to compare signatures, tokens and keys.
|
|
505
908
|
- Note: A plain comparison stops at the first wrong character, so response times can leak the secret bit by bit (timing attack, CWE-208).
|
|
909
|
+
- Real only when: The flagged line does what the finding says, in code or config that is in effect. Nothing nearby or elsewhere cancels it out. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
910
|
+
- Not a problem when: A stronger setting elsewhere takes effect over this one. The line only runs outside production. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
911
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/208
|
|
506
912
|
- Page: https://lintsure.com/rules/crypto-unsafe-compare
|
|
507
913
|
|
|
508
914
|
## graphql.introspection
|
|
509
915
|
**GraphQL introspection switched on** · status when found: partial · risk: low
|
|
510
916
|
|
|
511
|
-
- Controls: owasp-top10 A02:2025 (Security Misconfiguration)
|
|
917
|
+
- Controls: owasp-top10 A02:2025 (Security Misconfiguration); owasp-api API8:2023 (Security Misconfiguration)
|
|
512
918
|
- Fix: Turn introspection off in production, for example introspection: process.env.NODE_ENV !== "production".
|
|
513
919
|
- Note: Introspection hands anyone a full map of your API, including fields you never meant to advertise (CWE-200).
|
|
920
|
+
- Real only when: Someone who should not have access can reach this code path: the endpoint, table or function is exposed. Nothing earlier enforces the check: no middleware, gateway, database policy or wrapper covers this path. What it guards matters: other people's data, an account, money, or an action with lasting effect.
|
|
921
|
+
- Not a problem when: The check exists somewhere else that covers this path, and you can name the file and line. The data or action is public on purpose. The line only runs outside production, inside a branch that checks the environment. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
922
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/200
|
|
514
923
|
- Page: https://lintsure.com/rules/graphql-introspection
|
|
515
924
|
|
|
516
925
|
## ml.unsafe-model-load
|
|
@@ -519,6 +928,9 @@
|
|
|
519
928
|
- Controls: owasp-top10 A08:2025 (Software or Data Integrity Failures); owasp-llm LLM04:2026 (Supply Chain)
|
|
520
929
|
- Fix: Load weights only: torch.load(path, weights_only=True), or use safetensors. Don't pass trust_remote_code=True; if a model needs it, pin the exact revision you reviewed.
|
|
521
930
|
- Note: A model checkpoint saved with pickle can carry code that runs the moment it is loaded, and trust_remote_code=True runs Python from the model's repository on your server (CWE-502). Since PyTorch 2.6, torch.load loads weights only by default, so a plain call is Partial: it depends on your PyTorch version.
|
|
931
|
+
- Real only when: An agent or model will read or run this: the file is where the agent looks, or the call is in code that ships. The text or input is used as written: it is an instruction or a live value, not a quoted example or a warning about one. A person does not see or approve the step before it takes effect.
|
|
932
|
+
- Not a problem when: The file is a detector, a test set or documentation that lists these patterns to catch or explain them. It is the stated job of the skill or tool, and the user is asked before it happens. A limit set elsewhere applies: the agent's own permission prompts, an output cap, a sandbox.
|
|
933
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/502
|
|
522
934
|
- When Partial, Lintsure can't see: Lintsure can't see which PyTorch version runs this, or whether the model file comes only from you.
|
|
523
935
|
- Page: https://lintsure.com/rules/ml-unsafe-model-load
|
|
524
936
|
|
|
@@ -528,31 +940,43 @@
|
|
|
528
940
|
- Controls: owasp-top10 A07:2025 (Authentication Failures); owasp-top10 A02:2025 (Security Misconfiguration)
|
|
529
941
|
- Fix: Set a long random password from a secret store or an untracked .env file, for example POSTGRES_PASSWORD=${POSTGRES_PASSWORD} with no default.
|
|
530
942
|
- Note: These defaults are published in every image's documentation, so anyone who can reach the port can log in (CWE-1393). Marked Partial: fine on a laptop with the port bound to 127.0.0.1, not on a server.
|
|
943
|
+
- Real only when: The value is a working credential, or the place where one will be put: long, random-looking, or with a provider's prefix. Code that runs for users reads it, or it is in a file that gets committed or shipped. Nothing replaces it before it is used: no environment variable or secret store overrides it in production.
|
|
944
|
+
- Not a problem when: It is a placeholder or an example: a made-up value, a documented test key, or text that only describes a key. It is public by design, such as a publishable or anon key meant for the browser. It is a fallback for local development only, and production fails to start without the real one.
|
|
945
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/1393
|
|
531
946
|
- Page: https://lintsure.com/rules/config-default-service-password
|
|
532
947
|
|
|
533
948
|
## supabase.rls-disabled
|
|
534
949
|
**Database table without row level security** · status when found: partial · risk: high
|
|
535
950
|
|
|
536
|
-
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A01:2025 (Broken Access Control); cra Annex I Part I (2)(d) (Protection from unauthorised access); cwe-top25 CWE-862 (Missing Authorization)
|
|
951
|
+
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A01:2025 (Broken Access Control); cra Annex I Part I (2)(d) (Protection from unauthorised access); cwe-top25 CWE-862 (Missing Authorization); owasp-api API1:2023 (Broken Object Level Authorization)
|
|
537
952
|
- Fix: Add `alter table <name> enable row level security;` and a policy that limits each row to its owner, for example `using (auth.uid() = user_id)`.
|
|
538
953
|
- Note: In Supabase, a table without row level security can be read and changed by anyone with your public anon key, which ships in every browser. Lintsure looks across every SQL file in supabase/. Marked Partial: it may be switched on outside these files, for example in the dashboard.
|
|
954
|
+
- Real only when: Someone who should not have access can reach this code path: the endpoint, table or function is exposed. Nothing earlier enforces the check: no middleware, gateway, database policy or wrapper covers this path. What it guards matters: other people's data, an account, money, or an action with lasting effect.
|
|
955
|
+
- Not a problem when: The check exists somewhere else that covers this path, and you can name the file and line. The data or action is public on purpose. The line only runs outside production, inside a branch that checks the environment. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
956
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/862
|
|
539
957
|
- Seen in a real incident: CVE-2025-48757: missing row level security let anyone read or write the tables of apps generated with Lovable (https://www.cve.org/CVERecord?id=CVE-2025-48757)
|
|
540
958
|
- Page: https://lintsure.com/rules/supabase-rls-disabled
|
|
541
959
|
|
|
542
960
|
## supabase.policy-allows-all
|
|
543
961
|
**Database policy that lets everyone in** · status when found: partial · risk: high
|
|
544
962
|
|
|
545
|
-
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A01:2025 (Broken Access Control); cra Annex I Part I (2)(d) (Protection from unauthorised access); cwe-top25 CWE-284 (Improper Access Control)
|
|
963
|
+
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A01:2025 (Broken Access Control); cra Annex I Part I (2)(d) (Protection from unauthorised access); cwe-top25 CWE-284 (Improper Access Control); owasp-api API1:2023 (Broken Object Level Authorization)
|
|
546
964
|
- Fix: Limit the policy to the right people, for example `using (auth.uid() = user_id)`. Keep `using (true)` only for data that is meant to be public, such as published posts.
|
|
547
965
|
- Note: `using (true)` or `with check (true)` turns row level security on but lets every request through, so the table is as open as having no security at all. Marked Partial: public read access can be intended.
|
|
966
|
+
- Real only when: The policy applies to insert, update, delete or all, and its condition is simply true. The role it applies to includes anon or authenticated, not only service_role. The table holds data that should differ per user.
|
|
967
|
+
- Not a problem when: The policy is select-only on a table meant to be public reading. The policy is for service_role alone. A later migration drops or replaces this policy.
|
|
968
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/284
|
|
548
969
|
- Page: https://lintsure.com/rules/supabase-policy-allows-all
|
|
549
970
|
|
|
550
971
|
## supabase.function-no-auth
|
|
551
972
|
**Supabase Edge Function anyone can call** · status when found: partial · risk: high
|
|
552
973
|
|
|
553
|
-
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A01:2025 (Broken Access Control); cra Annex I Part I (2)(d) (Protection from unauthorised access); cwe-top25 CWE-306 (Missing Authentication for Critical Function)
|
|
974
|
+
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A01:2025 (Broken Access Control); cra Annex I Part I (2)(d) (Protection from unauthorised access); cwe-top25 CWE-306 (Missing Authentication for Critical Function); owasp-api API5:2023 (Broken Function Level Authorization)
|
|
554
975
|
- Fix: Keep verify_jwt on for this function, or check the caller yourself at the top of the handler: supabase.auth.getUser() for users, or the provider's signature for a webhook.
|
|
555
976
|
- Note: verify_jwt = false switches off Supabase's check that the caller is logged in, so anyone who knows the URL can call the function. Webhooks do this on purpose and verify a signature instead. Lintsure flags it only when the function's own code shows no check of its own. Marked Gap when the function also uses the service-role key or a paid AI API, because then anyone can read or change data, or spend your credits.
|
|
977
|
+
- Real only when: Someone who should not have access can reach this code path: the endpoint, table or function is exposed. Nothing earlier enforces the check: no middleware, gateway, database policy or wrapper covers this path. What it guards matters: other people's data, an account, money, or an action with lasting effect.
|
|
978
|
+
- Not a problem when: The check exists somewhere else that covers this path, and you can name the file and line. The data or action is public on purpose. The line only runs outside production, inside a branch that checks the environment. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
979
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/306
|
|
556
980
|
- Page: https://lintsure.com/rules/supabase-function-no-auth
|
|
557
981
|
|
|
558
982
|
## secret.public-env
|
|
@@ -561,6 +985,9 @@
|
|
|
561
985
|
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A04:2025 (Cryptographic Failures); cra Annex I Part I (2)(e) (Confidentiality of data); owasp-llm LLM02:2026 (Sensitive Information Disclosure); cwe-top25 CWE-200 (Exposure of Sensitive Information)
|
|
562
986
|
- Fix: Rename the variable without the public prefix (NEXT_PUBLIC_, VITE_ and so on), use it only in server code, and rotate the key, since it has already been shipped to browsers.
|
|
563
987
|
- Note: Variables starting with NEXT_PUBLIC_, VITE_, EXPO_PUBLIC_ or REACT_APP_ are copied into the JavaScript every visitor downloads. Anyone can read a secret, service-role or private key put there. Keys that are public by design (Supabase anon, Stripe publishable, Firebase) are not flagged.
|
|
988
|
+
- Real only when: The value is a working credential, or the place where one will be put: long, random-looking, or with a provider's prefix. Code that runs for users reads it, or it is in a file that gets committed or shipped. Nothing replaces it before it is used: no environment variable or secret store overrides it in production.
|
|
989
|
+
- Not a problem when: It is a placeholder or an example: a made-up value, a documented test key, or text that only describes a key. It is public by design, such as a publishable or anon key meant for the browser. It is a fallback for local development only, and production fails to start without the real one.
|
|
990
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/200
|
|
564
991
|
- Page: https://lintsure.com/rules/secret-public-env
|
|
565
992
|
|
|
566
993
|
## supabase.service-key-in-client
|
|
@@ -569,6 +996,9 @@
|
|
|
569
996
|
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A01:2025 (Broken Access Control); cra Annex I Part I (2)(d) (Protection from unauthorised access); cwe-top25 CWE-284 (Improper Access Control)
|
|
570
997
|
- Fix: Use the service-role key only in server code (API routes, server actions, edge functions). In browser code, use the anon key with row level security, and rotate the service-role key if it was ever shipped.
|
|
571
998
|
- Note: The service-role key skips every row level security rule. In a file marked "use client", or in browser-exposed env vars, it reaches every visitor, who can then read and change your whole database.
|
|
999
|
+
- Real only when: The value is a working credential, or the place where one will be put: long, random-looking, or with a provider's prefix. Code that runs for users reads it, or it is in a file that gets committed or shipped. Nothing replaces it before it is used: no environment variable or secret store overrides it in production.
|
|
1000
|
+
- Not a problem when: It is a placeholder or an example: a made-up value, a documented test key, or text that only describes a key. It is public by design, such as a publishable or anon key meant for the browser. It is a fallback for local development only, and production fails to start without the real one.
|
|
1001
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/284
|
|
572
1002
|
- Page: https://lintsure.com/rules/supabase-service-key-in-client
|
|
573
1003
|
|
|
574
1004
|
## build.sourcemaps-public
|
|
@@ -577,6 +1007,9 @@
|
|
|
577
1007
|
- Controls: owasp-top10 A02:2025 (Security Misconfiguration); cra Annex I Part I (2)(b) (Secure by default configuration); cwe-top25 CWE-200 (Exposure of Sensitive Information)
|
|
578
1008
|
- Fix: Turn off browser source maps for production, or upload them privately to your error tracker instead of serving them.
|
|
579
1009
|
- Note: Public source maps let anyone read your original front-end code, comments and file structure, which makes other weaknesses easier to find. Marked Partial: some teams publish them on purpose.
|
|
1010
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
1011
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
1012
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/200
|
|
580
1013
|
- Page: https://lintsure.com/rules/build-sourcemaps-public
|
|
581
1014
|
|
|
582
1015
|
## release.env-not-ignored
|
|
@@ -585,24 +1018,52 @@
|
|
|
585
1018
|
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A02:2025 (Security Misconfiguration)
|
|
586
1019
|
- Fix: Add .env and .env.* to .gitignore (keep !.env.example if you share one), then check `git ls-files` for env files already committed and rotate any secret keys they held.
|
|
587
1020
|
- Note: The project keeps settings in .env files, but .gitignore has no line for them, so the next `git add .` can publish them. Marked Gap when a file holds a secret-looking value (a key, token or password without a public prefix such as VITE_ or NEXT_PUBLIC_). Partial when only public settings are in it. Example and template files (.env.example) don't count.
|
|
1021
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
1022
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
588
1023
|
- When Partial, Lintsure can't see: Lintsure reads files, not git, so it can't tell whether the env file is already committed. Check with git ls-files.
|
|
589
1024
|
- Page: https://lintsure.com/rules/release-env-not-ignored
|
|
590
1025
|
|
|
591
1026
|
## auth.no-rate-limit
|
|
592
1027
|
**Login or password reset with no rate limit in sight** · status when found: partial · risk: medium · medium confidence (shown with --all)
|
|
593
1028
|
|
|
594
|
-
- Controls: owasp-top10 A07:2025 (Authentication Failures)
|
|
1029
|
+
- Controls: owasp-top10 A07:2025 (Authentication Failures); owasp-api API2:2023 (Broken Authentication); owasp-api API4:2023 (Unrestricted Resource Consumption)
|
|
595
1030
|
- Fix: Limit how often one IP or account can try: a middleware limiter (for example @upstash/ratelimit, express-rate-limit or rate-limiter-flexible), or a firewall rule for this path. Lock or slow down after repeated failures.
|
|
596
1031
|
- Note: Without a limit, anyone can try passwords, one-time codes or reset links as fast as they like (CWE-307). Partial: a firewall, an API gateway or your auth provider may already limit this outside the code.
|
|
1032
|
+
- Real only when: The endpoint checks a password, a one-time code or a reset token. No limiter is applied in the handler, the middleware or the framework config. The auth provider does not limit attempts on its own side for this flow.
|
|
1033
|
+
- Not a problem when: The route hands the attempt to an auth provider that limits and locks out by itself. A firewall, gateway or hosting rule limits this path, with evidence. The endpoint only starts a flow and never tells the caller whether a guess was right.
|
|
1034
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/307
|
|
597
1035
|
- When Partial, Lintsure can't see: Lintsure looked for a rate limiter in this file, middleware and package.json. It can't see limits set in a firewall, gateway or hosting dashboard.
|
|
598
1036
|
- Page: https://lintsure.com/rules/auth-no-rate-limit
|
|
599
1037
|
|
|
1038
|
+
## ci.scan-cannot-fail
|
|
1039
|
+
**Security scan in CI that can never fail the build** · status when found: partial · risk: low
|
|
1040
|
+
|
|
1041
|
+
- Controls: cra Annex I Part II (7) (Updates distributed securely); owasp-top10 A03:2025 (Software Supply Chain Failures)
|
|
1042
|
+
- Fix: Let the scan fail the job. If it is too noisy, limit it to high severity or to new findings instead of ignoring its result.
|
|
1043
|
+
- Note: With `|| true`, a soft-fail flag or continue-on-error, the scan runs and reports but nothing stops a build that has findings, so it gives a sense of safety it doesn't deliver. Marked Partial: some teams read the report by hand on purpose.
|
|
1044
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
1045
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
1046
|
+
- Page: https://lintsure.com/rules/ci-scan-cannot-fail
|
|
1047
|
+
|
|
1048
|
+
## deps.unsafe-source
|
|
1049
|
+
**Packages fetched from a source that can be swapped** · status when found: gap · risk: medium
|
|
1050
|
+
|
|
1051
|
+
- Controls: cra Annex I Part II (1) (Components identified, including an SBOM); owasp-top10 A03:2025 (Software Supply Chain Failures); owasp-top10 A08:2025 (Software or Data Integrity Failures)
|
|
1052
|
+
- Fix: Use one index or registry over https. For private packages, point only their scope or name at the private registry (npm: @scope:registry=..., pip: --index-url with a proxy that serves both) instead of adding a second index.
|
|
1053
|
+
- Note: Over plain HTTP, or with certificate checks off, anyone on the network path can serve a different package. With a second pip index, a public package that takes an internal name with a higher version is installed instead (dependency confusion, CWE-829). Partial for the second-index case: your internal names may already be reserved.
|
|
1054
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
1055
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
1056
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/829
|
|
1057
|
+
- Page: https://lintsure.com/rules/deps-unsafe-source
|
|
1058
|
+
|
|
600
1059
|
## repo.no-security-policy
|
|
601
1060
|
**No way for people to report a vulnerability** · status when found: partial · risk: medium
|
|
602
1061
|
|
|
603
1062
|
- Controls: cra Annex I Part II (5) (Coordinated vulnerability disclosure policy)
|
|
604
1063
|
- Fix: Add a SECURITY.md to the repository root (or .github/) saying where to report a vulnerability, what to include and how soon you'll reply.
|
|
605
1064
|
- Note: The Cyber Resilience Act expects a policy for coordinated vulnerability disclosure and a contact address for reports. Marked Partial: the policy may live on your website, or you scanned a subfolder of a larger repo.
|
|
1065
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
1066
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
606
1067
|
- Page: https://lintsure.com/rules/repo-no-security-policy
|
|
607
1068
|
|
|
608
1069
|
## repo.no-sbom
|
|
@@ -611,6 +1072,8 @@
|
|
|
611
1072
|
- Controls: cra Annex I Part II (1) (Components identified, including an SBOM)
|
|
612
1073
|
- Fix: Generate an SBOM in CycloneDX or SPDX format at release, for example with `npx @cyclonedx/cyclonedx-npm` or `syft`, and keep it with each release.
|
|
613
1074
|
- Note: The Cyber Resilience Act asks makers to list the components in their product, at least the top-level dependencies, in a machine-readable SBOM. Marked Partial: it may be generated in CI or at release instead of kept in the repo; if so, accept this finding with that reason.
|
|
1075
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
1076
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
614
1077
|
- Page: https://lintsure.com/rules/repo-no-sbom
|
|
615
1078
|
|
|
616
1079
|
## update.unverified-download
|
|
@@ -619,6 +1082,8 @@
|
|
|
619
1082
|
- Controls: cra Annex I Part II (7) (Updates distributed securely); owasp-top10 A03:2025 (Software Supply Chain Failures); owasp-top10 A08:2025 (Software or Data Integrity Failures)
|
|
620
1083
|
- Fix: Download the file first, check it against a published checksum or signature, then run it. Or install from a package manager that verifies packages.
|
|
621
1084
|
- Note: Piping `curl` or `wget` straight into a shell runs whatever the server sends at that moment, with no check that it is the file you expect. Marked Partial: well-known installers over HTTPS are a common, accepted risk.
|
|
1085
|
+
- Real only when: A script or binary is downloaded and then run or installed. No checksum or signature is checked, and the address is not pinned to a version. It runs in a build, a deploy or on users' machines, not only once on a developer's laptop.
|
|
1086
|
+
- Not a problem when: A checksum or signature is verified before the file is run. The address includes an exact version or commit and the source is one you trust. The line is from a README telling a person what to run, not something a pipeline runs.
|
|
622
1087
|
- Page: https://lintsure.com/rules/update-unverified-download
|
|
623
1088
|
|
|
624
1089
|
## ci.write-all-permissions
|
|
@@ -627,6 +1092,8 @@
|
|
|
627
1092
|
- Controls: cra Annex I Part II (7) (Updates distributed securely); owasp-top10 A03:2025 (Software Supply Chain Failures)
|
|
628
1093
|
- Fix: Replace `permissions: write-all` with only what the job needs, for example `permissions: contents: read`, and grant write access per job where it's really used.
|
|
629
1094
|
- Note: With write-all, any step that is compromised, including a third-party action, can push code, change releases or edit issues with the workflow's token.
|
|
1095
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
1096
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
630
1097
|
- Page: https://lintsure.com/rules/ci-write-all-permissions
|
|
631
1098
|
|
|
632
1099
|
## ci.script-injection
|
|
@@ -635,6 +1102,8 @@
|
|
|
635
1102
|
- Controls: cra Annex I Part II (7) (Updates distributed securely); owasp-top10 A03:2025 (Software Supply Chain Failures); owasp-top10 A08:2025 (Software or Data Integrity Failures)
|
|
636
1103
|
- Fix: Pass the value through an environment variable instead, for example `env: TITLE: ${{ github.event.issue.title }}` and then use "$TITLE" in the script.
|
|
637
1104
|
- Note: Anyone who opens an issue or pull request controls its title, body and branch name. Pasted into a `run:` step, that text becomes part of the shell command and can run anything with the workflow's secrets.
|
|
1105
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
1106
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
638
1107
|
- Page: https://lintsure.com/rules/ci-script-injection
|
|
639
1108
|
|
|
640
1109
|
## repo.binary-committed
|
|
@@ -643,6 +1112,8 @@
|
|
|
643
1112
|
- Controls: cra Annex I Part II (1) (Components identified, including an SBOM)
|
|
644
1113
|
- Fix: Remove the file and build it from source in CI, or download it at build time from a release with a checksum.
|
|
645
1114
|
- Note: Nobody can review what a compiled file does, and it isn't covered by dependency checks. Marked Partial: some projects keep a reviewed binary on purpose.
|
|
1115
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
1116
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
646
1117
|
- Page: https://lintsure.com/rules/repo-binary-committed
|
|
647
1118
|
|
|
648
1119
|
## repo.no-dependency-updates
|
|
@@ -651,6 +1122,8 @@
|
|
|
651
1122
|
- Controls: cra Annex I Part II (2) (Vulnerabilities fixed without delay)
|
|
652
1123
|
- Fix: Turn on Dependabot (add .github/dependabot.yml) or Renovate (renovate.json), so security fixes in your dependencies reach you as pull requests.
|
|
653
1124
|
- Note: The Cyber Resilience Act expects vulnerabilities to be fixed without delay, including in the components you use. Marked Partial: updates may be handled another way, such as a hosted setting.
|
|
1125
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
1126
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
654
1127
|
- Page: https://lintsure.com/rules/repo-no-dependency-updates
|
|
655
1128
|
|
|
656
1129
|
## llm.user-input-in-system-prompt
|
|
@@ -659,22 +1132,40 @@
|
|
|
659
1132
|
- Controls: owasp-llm LLM01:2026 (Prompt Injection); owasp-llm LLM08:2026 (Hidden Context Exposure)
|
|
660
1133
|
- Fix: Keep the system prompt fixed. Send what the user typed as a separate user message, and never put it inside the system instructions.
|
|
661
1134
|
- Note: Text in the system prompt is treated as the app's own instructions. If user text goes there, a user can rewrite the rules the AI follows (prompt injection). Marked Partial: the inserted value may be safe text your app controls.
|
|
1135
|
+
- Real only when: Text a user or an outside document supplies is placed in the system or developer message. The model can call tools or its answer is acted on, so changed instructions have an effect. Nothing separates the outside text from the instructions or strips instruction-like content.
|
|
1136
|
+
- Not a problem when: Only a value from a fixed list (a language, a tone, a plan name) goes into the prompt. The outside text goes in the user message, and the system message stays fixed. The model has no tools and its answer is only shown back to the same user.
|
|
662
1137
|
- Page: https://lintsure.com/rules/llm-user-input-in-system-prompt
|
|
663
1138
|
|
|
1139
|
+
## llm.retrieved-text-in-system-prompt
|
|
1140
|
+
**Retrieved or stored text placed inside the AI's system instructions** · status when found: partial · risk: medium
|
|
1141
|
+
|
|
1142
|
+
- Controls: owasp-llm LLM01:2026 (Prompt Injection)
|
|
1143
|
+
- Fix: Keep the system prompt fixed. Pass retrieved documents, search results and memories as a separate message, marked as reference material, and tell the model not to follow instructions found in them.
|
|
1144
|
+
- Note: A web page, an uploaded file or a saved memory can contain a line written for the model. In the system prompt it carries the app's authority, so whoever wrote that text can steer the AI (OWASP LLM01). Marked Partial: the source may be one only your team writes.
|
|
1145
|
+
- Real only when: An agent or model will read or run this: the file is where the agent looks, or the call is in code that ships. The text or input is used as written: it is an instruction or a live value, not a quoted example or a warning about one. A person does not see or approve the step before it takes effect.
|
|
1146
|
+
- Not a problem when: The file is a detector, a test set or documentation that lists these patterns to catch or explain them. It is the stated job of the skill or tool, and the user is asked before it happens. A limit set elsewhere applies: the agent's own permission prompts, an output cap, a sandbox.
|
|
1147
|
+
- When Partial, Lintsure can't see: Lintsure can't see where the text comes from. Content your own team writes is a smaller risk than pages, uploads or anything users can add to.
|
|
1148
|
+
- Page: https://lintsure.com/rules/llm-retrieved-text-in-system-prompt
|
|
1149
|
+
|
|
664
1150
|
## llm.output-to-sink
|
|
665
1151
|
**AI output run as code, a command, a query or page HTML** · status when found: gap · risk: high
|
|
666
1152
|
|
|
667
1153
|
- Controls: owasp-llm LLM10:2026 (Improper Output Handling); cwe-top25 CWE-94 (Code Injection); cwe-top25 CWE-79 (Cross-site Scripting); cwe-top25 CWE-78 (OS Command Injection); cwe-top25 CWE-89 (SQL Injection)
|
|
668
1154
|
- Fix: Treat model output like input from a stranger: validate it against what you expect, escape it for HTML, and never run it as code, a shell command or SQL.
|
|
669
1155
|
- Note: A model's reply can be steered by anyone who can influence its input. Passing it straight to eval, a shell, a database query or innerHTML lets them run code or change data.
|
|
1156
|
+
- Real only when: The value comes from outside your code: a request, a form, a file upload, a model's answer or another service. It reaches the flagged call unchanged, with no escaping, parameter binding, allow-list or schema check on the way. The file is part of what runs for users: not a test, a fixture, an example, a seed script or a dev tool.
|
|
1157
|
+
- Not a problem when: The value is a constant, or is built only from constants and your own config. A check on the way makes it safe: a parameterised query, an escaping helper, an allow-list, a validator that rejects anything unexpected. The file never runs for users: a test, a fixture, an example, documentation or a one-off script.
|
|
1158
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/94 https://www.opencre.org/node/standard/CWE/sectionid/79 https://www.opencre.org/node/standard/CWE/sectionid/78 https://www.opencre.org/node/standard/CWE/sectionid/89
|
|
670
1159
|
- Page: https://lintsure.com/rules/llm-output-to-sink
|
|
671
1160
|
|
|
672
1161
|
## llm.unbounded-agent-loop
|
|
673
1162
|
**AI agent loop with no real step limit** · status when found: gap · risk: medium
|
|
674
1163
|
|
|
675
|
-
- Controls: owasp-llm LLM06:2026 (Unbounded Consumption)
|
|
1164
|
+
- Controls: owasp-llm LLM06:2026 (Unbounded Consumption); owasp-api API4:2023 (Unrestricted Resource Consumption)
|
|
676
1165
|
- Fix: Stop the loop after a small number of steps, for example stopWhen: stepCountIs(10), and set maxOutputTokens.
|
|
677
1166
|
- Note: Each step is another paid model call and maybe another tool run. With no limit, one request, or one prompt-injected document, can keep the agent going until something times out.
|
|
1167
|
+
- Real only when: An agent or model will read or run this: the file is where the agent looks, or the call is in code that ships. The text or input is used as written: it is an instruction or a live value, not a quoted example or a warning about one. A person does not see or approve the step before it takes effect.
|
|
1168
|
+
- Not a problem when: The file is a detector, a test set or documentation that lists these patterns to catch or explain them. It is the stated job of the skill or tool, and the user is asked before it happens. A limit set elsewhere applies: the agent's own permission prompts, an output cap, a sandbox.
|
|
678
1169
|
- Page: https://lintsure.com/rules/llm-unbounded-agent-loop
|
|
679
1170
|
|
|
680
1171
|
## llm.client-controls-system
|
|
@@ -683,14 +1174,19 @@
|
|
|
683
1174
|
- Controls: owasp-llm LLM01:2026 (Prompt Injection)
|
|
684
1175
|
- Fix: Build the system prompt on the server. Take only the user's messages from the request, and ignore any system text it sends.
|
|
685
1176
|
- Note: Whoever calls the route can rewrite the rules the AI follows, including what it may say or which tools it may use (prompt injection, OWASP LLM01).
|
|
1177
|
+
- Real only when: An agent or model will read or run this: the file is where the agent looks, or the call is in code that ships. The text or input is used as written: it is an instruction or a live value, not a quoted example or a warning about one. A person does not see or approve the step before it takes effect.
|
|
1178
|
+
- Not a problem when: The file is a detector, a test set or documentation that lists these patterns to catch or explain them. It is the stated job of the skill or tool, and the user is asked before it happens. A limit set elsewhere applies: the agent's own permission prompts, an output cap, a sandbox.
|
|
686
1179
|
- Page: https://lintsure.com/rules/llm-client-controls-system
|
|
687
1180
|
|
|
688
1181
|
## llm.no-output-limit
|
|
689
1182
|
**AI call with no limit on how much it may generate** · status when found: partial · risk: low · medium confidence (shown with --all)
|
|
690
1183
|
|
|
691
|
-
- Controls: owasp-llm LLM06:2026 (Unbounded Consumption); cwe-top25 CWE-770 (Allocation of Resources Without Limits or Throttling)
|
|
1184
|
+
- Controls: owasp-llm LLM06:2026 (Unbounded Consumption); cwe-top25 CWE-770 (Allocation of Resources Without Limits or Throttling); owasp-api API4:2023 (Unrestricted Resource Consumption)
|
|
692
1185
|
- Fix: Set a maximum output size on each call (max_tokens, maxTokens or max_output_tokens), and limit how often each user can call it.
|
|
693
1186
|
- Note: Without a limit, one request can run up a large bill or tie up the service (unbounded consumption). Marked Partial: the limit may be set in a shared client or wrapper.
|
|
1187
|
+
- Real only when: An agent or model will read or run this: the file is where the agent looks, or the call is in code that ships. The text or input is used as written: it is an instruction or a live value, not a quoted example or a warning about one. A person does not see or approve the step before it takes effect.
|
|
1188
|
+
- Not a problem when: The file is a detector, a test set or documentation that lists these patterns to catch or explain them. It is the stated job of the skill or tool, and the user is asked before it happens. A limit set elsewhere applies: the agent's own permission prompts, an output cap, a sandbox.
|
|
1189
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/770
|
|
694
1190
|
- Page: https://lintsure.com/rules/llm-no-output-limit
|
|
695
1191
|
|
|
696
1192
|
## mobile.token-in-plain-storage
|
|
@@ -699,6 +1195,8 @@
|
|
|
699
1195
|
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A04:2025 (Cryptographic Failures)
|
|
700
1196
|
- Fix: Store tokens and passwords in the platform's secure storage: expo-secure-store, react-native-keychain, the Android Keystore or the iOS Keychain.
|
|
701
1197
|
- Note: AsyncStorage and SharedPreferences aren't encrypted. Other apps on a rooted phone, or a device backup, can read what's saved there.
|
|
1198
|
+
- Real only when: The value is a working credential, or the place where one will be put: long, random-looking, or with a provider's prefix. Code that runs for users reads it, or it is in a file that gets committed or shipped. Nothing replaces it before it is used: no environment variable or secret store overrides it in production.
|
|
1199
|
+
- Not a problem when: It is a placeholder or an example: a made-up value, a documented test key, or text that only describes a key. It is public by design, such as a publishable or anon key meant for the browser. It is a fallback for local development only, and production fails to start without the real one.
|
|
702
1200
|
- Page: https://lintsure.com/rules/mobile-token-in-plain-storage
|
|
703
1201
|
|
|
704
1202
|
## mobile.cleartext-traffic
|
|
@@ -707,6 +1205,8 @@
|
|
|
707
1205
|
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A04:2025 (Cryptographic Failures)
|
|
708
1206
|
- Fix: Turn off cleartext traffic (usesCleartextTraffic false on Android, no NSAllowsArbitraryLoads on iOS) and use HTTPS everywhere. Allow exceptions per domain only if you must.
|
|
709
1207
|
- Note: With cleartext allowed, anyone on the same Wi-Fi can read and change what the app sends and receives.
|
|
1208
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
1209
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
710
1210
|
- Page: https://lintsure.com/rules/mobile-cleartext-traffic
|
|
711
1211
|
|
|
712
1212
|
## mobile.backup-allowed
|
|
@@ -715,6 +1215,8 @@
|
|
|
715
1215
|
- Controls: gdpr Art. 32 (Security of processing)
|
|
716
1216
|
- Fix: Set android:allowBackup="false", or limit what's backed up with backup rules that leave out tokens and personal data.
|
|
717
1217
|
- Note: Backups can be copied off the phone and read elsewhere. Marked Partial: backing up non-sensitive settings is fine.
|
|
1218
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
1219
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
718
1220
|
- Page: https://lintsure.com/rules/mobile-backup-allowed
|
|
719
1221
|
|
|
720
1222
|
## mobile.webview-any-origin
|
|
@@ -723,4 +1225,18 @@
|
|
|
723
1225
|
- Controls: owasp-top10 A06:2025 (Insecure Design)
|
|
724
1226
|
- Fix: List only the sites the WebView should open in originWhitelist, and open other links in the phone's browser.
|
|
725
1227
|
- Note: A WebView that accepts any origin can be sent to a page that abuses the bridge between the web page and your app. Marked Partial: it may only ever load your own content.
|
|
1228
|
+
- Real only when: The file is used for a real build, release or deployment, not kept as an example. The weak setting is the one in effect: nothing later in the file or in another file overrides it. It gives something to gain: a secret within reach, a wider permission, or code that can change without a change in this repo.
|
|
1229
|
+
- Not a problem when: The setting is pinned or tightened somewhere else that takes effect: a lockfile, a digest, a platform default, a runtime flag. The file is a local development or test setup that never reaches a real environment. The thing is first-party: your own action, image or script, in a repo you control.
|
|
726
1230
|
- Page: https://lintsure.com/rules/mobile-webview-any-origin
|
|
1231
|
+
|
|
1232
|
+
## authz.admin-route-no-check
|
|
1233
|
+
**Admin endpoint with no access check in sight** · status when found: partial · risk: high
|
|
1234
|
+
|
|
1235
|
+
- Controls: owasp-api API5:2023 (Broken Function Level Authorization); owasp-top10 A01:2025 (Broken Access Control)
|
|
1236
|
+
- Fix: Check the caller's role at the top of the handler and return 403 when it is not an admin. Do it on the server: hiding the admin page in the browser does not protect the endpoint behind it.
|
|
1237
|
+
- Note: Anyone who knows or guesses the address can call an endpoint. An admin endpoint that never looks at who is calling gives every visitor admin actions (CWE-862, CWE-285).
|
|
1238
|
+
- Real only when: The endpoint does something only an admin should: reads all users, changes roles, deletes records, sees billing. No role, session or token is checked in the handler or in a wrapper around it. The project's middleware does not cover this path, or covers pages only and lets API paths through.
|
|
1239
|
+
- Not a problem when: A wrapper or helper with a name Lintsure did not recognise checks the role: name the file and line. A gateway or reverse proxy in front of the app limits this path to admins, with evidence in config. The endpoint is public on purpose despite its path, such as an admin sign-in.
|
|
1240
|
+
- In other standards: https://www.opencre.org/node/standard/CWE/sectionid/862 https://www.opencre.org/node/standard/CWE/sectionid/285
|
|
1241
|
+
- When Partial, Lintsure can't see: Lintsure looked for a role, session or token check in this file and in the project's middleware. It can't see a check in a gateway, a reverse proxy or a wrapper it doesn't recognise.
|
|
1242
|
+
- Page: https://lintsure.com/rules/authz-admin-route-no-check
|