@lintsure/core 0.3.15 → 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 +4 -1
- package/dist/src/index.js +43 -13
- package/dist/src/knowledge/gdpr.js +1 -1
- package/dist/src/knowledge/index.js +2 -2
- package/dist/src/knowledge/more.d.ts +2 -0
- package/dist/src/knowledge/more.js +87 -1
- 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/index.js +9 -0
- package/dist/src/rules/more.d.ts +4 -0
- package/dist/src/rules/more.js +84 -3
- package/dist/src/rules/owasp.d.ts +7 -0
- package/dist/src/rules/owasp.js +33 -7
- package/dist/src/rules/standards.js +9 -0
- 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 +40 -4
- package/docs/rules.md +407 -32
- package/package.json +1 -1
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
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,14 +524,20 @@
|
|
|
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
|
|
|
407
543
|
## crypto.static-iv
|
|
@@ -410,6 +546,9 @@
|
|
|
410
546
|
- Controls: owasp-top10 A04:2025 (Cryptographic Failures); gdpr Art. 32 (Security of processing)
|
|
411
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.
|
|
412
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
|
|
413
552
|
- Page: https://lintsure.com/rules/crypto-static-iv
|
|
414
553
|
|
|
415
554
|
## crypto.weak-parameters
|
|
@@ -418,6 +557,9 @@
|
|
|
418
557
|
- Controls: owasp-top10 A04:2025 (Cryptographic Failures); gdpr Art. 32 (Security of processing)
|
|
419
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.
|
|
420
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
|
|
421
563
|
- Page: https://lintsure.com/rules/crypto-weak-parameters
|
|
422
564
|
|
|
423
565
|
## mobile.debuggable-build
|
|
@@ -426,6 +568,9 @@
|
|
|
426
568
|
- Controls: owasp-top10 A02:2025 (Security Misconfiguration); gdpr Art. 32 (Security of processing)
|
|
427
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.
|
|
428
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
|
|
429
574
|
- Page: https://lintsure.com/rules/mobile-debuggable-build
|
|
430
575
|
|
|
431
576
|
## privacy.consent-preticked
|
|
@@ -434,6 +579,8 @@
|
|
|
434
579
|
- Controls: gdpr Art. 7 (Conditions for consent)
|
|
435
580
|
- Fix: Start the box empty and let the person tick it. Store when they did and the wording they saw.
|
|
436
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.
|
|
437
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.
|
|
438
585
|
- Page: https://lintsure.com/rules/privacy-consent-preticked
|
|
439
586
|
|
|
@@ -443,6 +590,8 @@
|
|
|
443
590
|
- Controls: gdpr Art. 9 (Special categories of personal data)
|
|
444
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.
|
|
445
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.
|
|
446
595
|
- Page: https://lintsure.com/rules/privacy-special-category-field
|
|
447
596
|
|
|
448
597
|
## payment.card-code-stored
|
|
@@ -451,6 +600,8 @@
|
|
|
451
600
|
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A02:2025 (Security Misconfiguration)
|
|
452
601
|
- Fix: Never store the card security code. Send the card straight to your payment provider and keep only the token it gives back.
|
|
453
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.
|
|
454
605
|
- Page: https://lintsure.com/rules/payment-card-code-stored
|
|
455
606
|
|
|
456
607
|
## cloud.database-public
|
|
@@ -459,6 +610,9 @@
|
|
|
459
610
|
- Controls: owasp-top10 A01:2025 (Broken Access Control); owasp-top10 A02:2025 (Security Misconfiguration)
|
|
460
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.
|
|
461
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
|
|
462
616
|
- Page: https://lintsure.com/rules/cloud-database-public
|
|
463
617
|
|
|
464
618
|
## cloud.network-open
|
|
@@ -467,6 +621,9 @@
|
|
|
467
621
|
- Controls: owasp-top10 A01:2025 (Broken Access Control); owasp-top10 A02:2025 (Security Misconfiguration)
|
|
468
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.
|
|
469
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
|
|
470
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.
|
|
471
628
|
- Page: https://lintsure.com/rules/cloud-network-open
|
|
472
629
|
|
|
@@ -476,14 +633,19 @@
|
|
|
476
633
|
- Controls: owasp-top10 A01:2025 (Broken Access Control); owasp-top10 A02:2025 (Security Misconfiguration)
|
|
477
634
|
- Fix: List the actions and resources the role really needs. Start from what it calls today and add as you go.
|
|
478
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
|
|
479
639
|
- Page: https://lintsure.com/rules/cloud-iam-allow-all
|
|
480
640
|
|
|
481
641
|
## cloud.function-url-no-auth
|
|
482
642
|
**Function URL that anyone can call** · status when found: partial · risk: medium
|
|
483
643
|
|
|
484
|
-
- Controls: owasp-top10 A01:2025 (Broken Access Control); owasp-top10 A07:2025 (Authentication Failures)
|
|
644
|
+
- Controls: owasp-top10 A01:2025 (Broken Access Control); owasp-top10 A07:2025 (Authentication Failures); owasp-api API5:2023 (Broken Function Level Authorization)
|
|
485
645
|
- Fix: Use AWS_IAM as the authorization type, or check a signature or token in the function before doing anything.
|
|
486
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.
|
|
487
649
|
- Page: https://lintsure.com/rules/cloud-function-url-no-auth
|
|
488
650
|
|
|
489
651
|
## docker.runs-as-root
|
|
@@ -492,6 +654,9 @@
|
|
|
492
654
|
- Controls: owasp-top10 A02:2025 (Security Misconfiguration)
|
|
493
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.
|
|
494
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
|
|
495
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.
|
|
496
661
|
- Page: https://lintsure.com/rules/docker-runs-as-root
|
|
497
662
|
|
|
@@ -501,22 +666,54 @@
|
|
|
501
666
|
- Controls: owasp-top10 A08:2025 (Software or Data Integrity Failures)
|
|
502
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.
|
|
503
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
|
|
504
672
|
- Page: https://lintsure.com/rules/docker-image-unpinned
|
|
505
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
|
+
|
|
506
697
|
## docker.secret-in-build
|
|
507
698
|
**Secret given a value in a Dockerfile** · status when found: gap · risk: high
|
|
508
699
|
|
|
509
700
|
- Controls: owasp-top10 A02:2025 (Security Misconfiguration); owasp-top10 A08:2025 (Software or Data Integrity Failures)
|
|
510
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.
|
|
511
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
|
|
512
706
|
- Page: https://lintsure.com/rules/docker-secret-in-build
|
|
513
707
|
|
|
514
708
|
## mcp.config-unsafe-server
|
|
515
709
|
**MCP server run from a moving version or over plain HTTP** · status when found: partial · risk: medium
|
|
516
710
|
|
|
517
|
-
- Controls: owasp-llm LLM04:2026 (Supply Chain); owasp-top10 A08:2025 (Software or Data Integrity Failures)
|
|
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)
|
|
518
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.
|
|
519
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
|
|
520
717
|
- When Partial, Lintsure can't see: Lintsure can't see whether a lockfile or a private registry pins this package somewhere else.
|
|
521
718
|
- Page: https://lintsure.com/rules/mcp-config-unsafe-server
|
|
522
719
|
|
|
@@ -526,15 +723,67 @@
|
|
|
526
723
|
- Controls: owasp-llm LLM01:2026 (Prompt Injection); owasp-llm LLM04:2026 (Supply Chain)
|
|
527
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.
|
|
528
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
|
|
529
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.
|
|
530
730
|
- Page: https://lintsure.com/rules/mcp-tool-description-poisoned
|
|
531
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
|
+
|
|
532
778
|
## mcp.tool-runs-shell
|
|
533
779
|
**MCP tool that runs shell commands** · status when found: partial · risk: high
|
|
534
780
|
|
|
535
781
|
- Controls: owasp-llm LLM03:2026 (Excessive Agency); owasp-top10 A06:2025 (Insecure Design)
|
|
536
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.
|
|
537
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
|
|
538
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.
|
|
539
788
|
- Page: https://lintsure.com/rules/mcp-tool-runs-shell
|
|
540
789
|
|
|
@@ -544,32 +793,43 @@
|
|
|
544
793
|
- Controls: owasp-llm LLM03:2026 (Excessive Agency); owasp-top10 A01:2025 (Broken Access Control)
|
|
545
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.
|
|
546
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.
|
|
547
798
|
- When Partial, Lintsure can't see: Lintsure can't see what this credential is allowed to do.
|
|
548
799
|
- Page: https://lintsure.com/rules/mcp-tool-uses-secret
|
|
549
800
|
|
|
550
801
|
## authz.no-owner-check
|
|
551
802
|
**Record loaded by an id from the request, with no owner check** · status when found: partial · risk: high · medium confidence (shown with --all)
|
|
552
803
|
|
|
553
|
-
- 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)
|
|
554
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.
|
|
555
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
|
|
556
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.
|
|
557
811
|
- Page: https://lintsure.com/rules/authz-no-owner-check
|
|
558
812
|
|
|
559
813
|
## jwt.no-algorithm-pin
|
|
560
814
|
**Token verified without saying which algorithm is allowed** · status when found: partial · risk: medium · medium confidence (shown with --all)
|
|
561
815
|
|
|
562
|
-
- Controls: owasp-top10 A07:2025 (Authentication Failures)
|
|
816
|
+
- Controls: owasp-top10 A07:2025 (Authentication Failures); owasp-api API2:2023 (Broken Authentication)
|
|
563
817
|
- Fix: Pass the algorithm you sign with, for example jwt.verify(token, key, { algorithms: ["RS256"] }), or algorithms=["HS256"] in PyJWT.
|
|
564
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
|
|
565
822
|
- Page: https://lintsure.com/rules/jwt-no-algorithm-pin
|
|
566
823
|
|
|
567
824
|
## jwt.weak-secret
|
|
568
825
|
**Token signed with a short secret written in the code** · status when found: gap · risk: high
|
|
569
826
|
|
|
570
|
-
- 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)
|
|
571
828
|
- Fix: Read the signing key from the environment or a secret store, and make it at least 32 random bytes.
|
|
572
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
|
|
573
833
|
- Page: https://lintsure.com/rules/jwt-weak-secret
|
|
574
834
|
|
|
575
835
|
## proto.pollution
|
|
@@ -578,6 +838,9 @@
|
|
|
578
838
|
- Controls: owasp-top10 A08:2025 (Software or Data Integrity Failures)
|
|
579
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.
|
|
580
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
|
|
581
844
|
- Page: https://lintsure.com/rules/proto-pollution
|
|
582
845
|
|
|
583
846
|
## html.tabnabbing
|
|
@@ -586,6 +849,9 @@
|
|
|
586
849
|
- Controls: owasp-top10 A06:2025 (Insecure Design)
|
|
587
850
|
- Fix: Add rel="noopener noreferrer" to links with target="_blank".
|
|
588
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
|
|
589
855
|
- Page: https://lintsure.com/rules/html-tabnabbing
|
|
590
856
|
|
|
591
857
|
## ws.no-origin-check
|
|
@@ -594,6 +860,9 @@
|
|
|
594
860
|
- Controls: owasp-top10 A01:2025 (Broken Access Control)
|
|
595
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.
|
|
596
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
|
|
597
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.
|
|
598
867
|
- Page: https://lintsure.com/rules/ws-no-origin-check
|
|
599
868
|
|
|
@@ -603,6 +872,9 @@
|
|
|
603
872
|
- Controls: owasp-top10 A02:2025 (Security Misconfiguration)
|
|
604
873
|
- Fix: Remove privileged, hostNetwork, hostPID and hostIPC, set allowPrivilegeEscalation: false, and run as a non-root user.
|
|
605
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
|
|
606
878
|
- Page: https://lintsure.com/rules/k8s-privileged
|
|
607
879
|
|
|
608
880
|
## docker.socket-mounted
|
|
@@ -611,6 +883,9 @@
|
|
|
611
883
|
- Controls: owasp-top10 A02:2025 (Security Misconfiguration)
|
|
612
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.
|
|
613
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
|
|
614
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.
|
|
615
890
|
- Page: https://lintsure.com/rules/docker-socket-mounted
|
|
616
891
|
|
|
@@ -620,6 +895,9 @@
|
|
|
620
895
|
- Controls: owasp-top10 A01:2025 (Broken Access Control)
|
|
621
896
|
- Fix: Keep the bucket private and block public access. Share single files with short-lived signed URLs instead.
|
|
622
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
|
|
623
901
|
- Page: https://lintsure.com/rules/cloud-public-bucket
|
|
624
902
|
|
|
625
903
|
## crypto.unsafe-compare
|
|
@@ -628,14 +906,20 @@
|
|
|
628
906
|
- Controls: owasp-top10 A04:2025 (Cryptographic Failures)
|
|
629
907
|
- Fix: Use crypto.timingSafeEqual (Node) or hmac.compare_digest (Python) to compare signatures, tokens and keys.
|
|
630
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
|
|
631
912
|
- Page: https://lintsure.com/rules/crypto-unsafe-compare
|
|
632
913
|
|
|
633
914
|
## graphql.introspection
|
|
634
915
|
**GraphQL introspection switched on** · status when found: partial · risk: low
|
|
635
916
|
|
|
636
|
-
- Controls: owasp-top10 A02:2025 (Security Misconfiguration)
|
|
917
|
+
- Controls: owasp-top10 A02:2025 (Security Misconfiguration); owasp-api API8:2023 (Security Misconfiguration)
|
|
637
918
|
- Fix: Turn introspection off in production, for example introspection: process.env.NODE_ENV !== "production".
|
|
638
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
|
|
639
923
|
- Page: https://lintsure.com/rules/graphql-introspection
|
|
640
924
|
|
|
641
925
|
## ml.unsafe-model-load
|
|
@@ -644,6 +928,9 @@
|
|
|
644
928
|
- Controls: owasp-top10 A08:2025 (Software or Data Integrity Failures); owasp-llm LLM04:2026 (Supply Chain)
|
|
645
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.
|
|
646
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
|
|
647
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.
|
|
648
935
|
- Page: https://lintsure.com/rules/ml-unsafe-model-load
|
|
649
936
|
|
|
@@ -653,31 +940,43 @@
|
|
|
653
940
|
- Controls: owasp-top10 A07:2025 (Authentication Failures); owasp-top10 A02:2025 (Security Misconfiguration)
|
|
654
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.
|
|
655
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
|
|
656
946
|
- Page: https://lintsure.com/rules/config-default-service-password
|
|
657
947
|
|
|
658
948
|
## supabase.rls-disabled
|
|
659
949
|
**Database table without row level security** · status when found: partial · risk: high
|
|
660
950
|
|
|
661
|
-
- 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)
|
|
662
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)`.
|
|
663
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
|
|
664
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)
|
|
665
958
|
- Page: https://lintsure.com/rules/supabase-rls-disabled
|
|
666
959
|
|
|
667
960
|
## supabase.policy-allows-all
|
|
668
961
|
**Database policy that lets everyone in** · status when found: partial · risk: high
|
|
669
962
|
|
|
670
|
-
- 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)
|
|
671
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.
|
|
672
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
|
|
673
969
|
- Page: https://lintsure.com/rules/supabase-policy-allows-all
|
|
674
970
|
|
|
675
971
|
## supabase.function-no-auth
|
|
676
972
|
**Supabase Edge Function anyone can call** · status when found: partial · risk: high
|
|
677
973
|
|
|
678
|
-
- 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)
|
|
679
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.
|
|
680
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
|
|
681
980
|
- Page: https://lintsure.com/rules/supabase-function-no-auth
|
|
682
981
|
|
|
683
982
|
## secret.public-env
|
|
@@ -686,6 +985,9 @@
|
|
|
686
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)
|
|
687
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.
|
|
688
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
|
|
689
991
|
- Page: https://lintsure.com/rules/secret-public-env
|
|
690
992
|
|
|
691
993
|
## supabase.service-key-in-client
|
|
@@ -694,6 +996,9 @@
|
|
|
694
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)
|
|
695
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.
|
|
696
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
|
|
697
1002
|
- Page: https://lintsure.com/rules/supabase-service-key-in-client
|
|
698
1003
|
|
|
699
1004
|
## build.sourcemaps-public
|
|
@@ -702,6 +1007,9 @@
|
|
|
702
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)
|
|
703
1008
|
- Fix: Turn off browser source maps for production, or upload them privately to your error tracker instead of serving them.
|
|
704
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
|
|
705
1013
|
- Page: https://lintsure.com/rules/build-sourcemaps-public
|
|
706
1014
|
|
|
707
1015
|
## release.env-not-ignored
|
|
@@ -710,15 +1018,20 @@
|
|
|
710
1018
|
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A02:2025 (Security Misconfiguration)
|
|
711
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.
|
|
712
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.
|
|
713
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.
|
|
714
1024
|
- Page: https://lintsure.com/rules/release-env-not-ignored
|
|
715
1025
|
|
|
716
1026
|
## auth.no-rate-limit
|
|
717
1027
|
**Login or password reset with no rate limit in sight** · status when found: partial · risk: medium · medium confidence (shown with --all)
|
|
718
1028
|
|
|
719
|
-
- 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)
|
|
720
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.
|
|
721
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
|
|
722
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.
|
|
723
1036
|
- Page: https://lintsure.com/rules/auth-no-rate-limit
|
|
724
1037
|
|
|
@@ -728,6 +1041,8 @@
|
|
|
728
1041
|
- Controls: cra Annex I Part II (7) (Updates distributed securely); owasp-top10 A03:2025 (Software Supply Chain Failures)
|
|
729
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.
|
|
730
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.
|
|
731
1046
|
- Page: https://lintsure.com/rules/ci-scan-cannot-fail
|
|
732
1047
|
|
|
733
1048
|
## deps.unsafe-source
|
|
@@ -736,6 +1051,9 @@
|
|
|
736
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)
|
|
737
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.
|
|
738
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
|
|
739
1057
|
- Page: https://lintsure.com/rules/deps-unsafe-source
|
|
740
1058
|
|
|
741
1059
|
## repo.no-security-policy
|
|
@@ -744,6 +1062,8 @@
|
|
|
744
1062
|
- Controls: cra Annex I Part II (5) (Coordinated vulnerability disclosure policy)
|
|
745
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.
|
|
746
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.
|
|
747
1067
|
- Page: https://lintsure.com/rules/repo-no-security-policy
|
|
748
1068
|
|
|
749
1069
|
## repo.no-sbom
|
|
@@ -752,6 +1072,8 @@
|
|
|
752
1072
|
- Controls: cra Annex I Part II (1) (Components identified, including an SBOM)
|
|
753
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.
|
|
754
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.
|
|
755
1077
|
- Page: https://lintsure.com/rules/repo-no-sbom
|
|
756
1078
|
|
|
757
1079
|
## update.unverified-download
|
|
@@ -760,6 +1082,8 @@
|
|
|
760
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)
|
|
761
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.
|
|
762
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.
|
|
763
1087
|
- Page: https://lintsure.com/rules/update-unverified-download
|
|
764
1088
|
|
|
765
1089
|
## ci.write-all-permissions
|
|
@@ -768,6 +1092,8 @@
|
|
|
768
1092
|
- Controls: cra Annex I Part II (7) (Updates distributed securely); owasp-top10 A03:2025 (Software Supply Chain Failures)
|
|
769
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.
|
|
770
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.
|
|
771
1097
|
- Page: https://lintsure.com/rules/ci-write-all-permissions
|
|
772
1098
|
|
|
773
1099
|
## ci.script-injection
|
|
@@ -776,6 +1102,8 @@
|
|
|
776
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)
|
|
777
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.
|
|
778
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.
|
|
779
1107
|
- Page: https://lintsure.com/rules/ci-script-injection
|
|
780
1108
|
|
|
781
1109
|
## repo.binary-committed
|
|
@@ -784,6 +1112,8 @@
|
|
|
784
1112
|
- Controls: cra Annex I Part II (1) (Components identified, including an SBOM)
|
|
785
1113
|
- Fix: Remove the file and build it from source in CI, or download it at build time from a release with a checksum.
|
|
786
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.
|
|
787
1117
|
- Page: https://lintsure.com/rules/repo-binary-committed
|
|
788
1118
|
|
|
789
1119
|
## repo.no-dependency-updates
|
|
@@ -792,6 +1122,8 @@
|
|
|
792
1122
|
- Controls: cra Annex I Part II (2) (Vulnerabilities fixed without delay)
|
|
793
1123
|
- Fix: Turn on Dependabot (add .github/dependabot.yml) or Renovate (renovate.json), so security fixes in your dependencies reach you as pull requests.
|
|
794
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.
|
|
795
1127
|
- Page: https://lintsure.com/rules/repo-no-dependency-updates
|
|
796
1128
|
|
|
797
1129
|
## llm.user-input-in-system-prompt
|
|
@@ -800,22 +1132,40 @@
|
|
|
800
1132
|
- Controls: owasp-llm LLM01:2026 (Prompt Injection); owasp-llm LLM08:2026 (Hidden Context Exposure)
|
|
801
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.
|
|
802
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.
|
|
803
1137
|
- Page: https://lintsure.com/rules/llm-user-input-in-system-prompt
|
|
804
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
|
+
|
|
805
1150
|
## llm.output-to-sink
|
|
806
1151
|
**AI output run as code, a command, a query or page HTML** · status when found: gap · risk: high
|
|
807
1152
|
|
|
808
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)
|
|
809
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.
|
|
810
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
|
|
811
1159
|
- Page: https://lintsure.com/rules/llm-output-to-sink
|
|
812
1160
|
|
|
813
1161
|
## llm.unbounded-agent-loop
|
|
814
1162
|
**AI agent loop with no real step limit** · status when found: gap · risk: medium
|
|
815
1163
|
|
|
816
|
-
- Controls: owasp-llm LLM06:2026 (Unbounded Consumption)
|
|
1164
|
+
- Controls: owasp-llm LLM06:2026 (Unbounded Consumption); owasp-api API4:2023 (Unrestricted Resource Consumption)
|
|
817
1165
|
- Fix: Stop the loop after a small number of steps, for example stopWhen: stepCountIs(10), and set maxOutputTokens.
|
|
818
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.
|
|
819
1169
|
- Page: https://lintsure.com/rules/llm-unbounded-agent-loop
|
|
820
1170
|
|
|
821
1171
|
## llm.client-controls-system
|
|
@@ -824,14 +1174,19 @@
|
|
|
824
1174
|
- Controls: owasp-llm LLM01:2026 (Prompt Injection)
|
|
825
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.
|
|
826
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.
|
|
827
1179
|
- Page: https://lintsure.com/rules/llm-client-controls-system
|
|
828
1180
|
|
|
829
1181
|
## llm.no-output-limit
|
|
830
1182
|
**AI call with no limit on how much it may generate** · status when found: partial · risk: low · medium confidence (shown with --all)
|
|
831
1183
|
|
|
832
|
-
- 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)
|
|
833
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.
|
|
834
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
|
|
835
1190
|
- Page: https://lintsure.com/rules/llm-no-output-limit
|
|
836
1191
|
|
|
837
1192
|
## mobile.token-in-plain-storage
|
|
@@ -840,6 +1195,8 @@
|
|
|
840
1195
|
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A04:2025 (Cryptographic Failures)
|
|
841
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.
|
|
842
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.
|
|
843
1200
|
- Page: https://lintsure.com/rules/mobile-token-in-plain-storage
|
|
844
1201
|
|
|
845
1202
|
## mobile.cleartext-traffic
|
|
@@ -848,6 +1205,8 @@
|
|
|
848
1205
|
- Controls: gdpr Art. 32 (Security of processing); owasp-top10 A04:2025 (Cryptographic Failures)
|
|
849
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.
|
|
850
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.
|
|
851
1210
|
- Page: https://lintsure.com/rules/mobile-cleartext-traffic
|
|
852
1211
|
|
|
853
1212
|
## mobile.backup-allowed
|
|
@@ -856,6 +1215,8 @@
|
|
|
856
1215
|
- Controls: gdpr Art. 32 (Security of processing)
|
|
857
1216
|
- Fix: Set android:allowBackup="false", or limit what's backed up with backup rules that leave out tokens and personal data.
|
|
858
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.
|
|
859
1220
|
- Page: https://lintsure.com/rules/mobile-backup-allowed
|
|
860
1221
|
|
|
861
1222
|
## mobile.webview-any-origin
|
|
@@ -864,4 +1225,18 @@
|
|
|
864
1225
|
- Controls: owasp-top10 A06:2025 (Insecure Design)
|
|
865
1226
|
- Fix: List only the sites the WebView should open in originWhitelist, and open other links in the phone's browser.
|
|
866
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.
|
|
867
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
|