@lintsure/core 0.3.13 → 0.3.15
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/guidance.d.ts +1 -1
- package/dist/src/guidance.js +3 -1
- package/dist/src/index.d.ts +20 -2
- package/dist/src/index.js +252 -34
- package/dist/src/knowledge/cra.js +2 -2
- package/dist/src/knowledge/gdpr.js +3 -3
- package/dist/src/knowledge/more.js +3 -3
- package/dist/src/knowledge/owasp-top10.js +3 -3
- package/dist/src/rules/cra.d.ts +4 -0
- package/dist/src/rules/cra.js +73 -3
- package/dist/src/rules/index.d.ts +3 -0
- package/dist/src/rules/index.js +57 -14
- package/dist/src/rules/more.d.ts +29 -0
- package/dist/src/rules/more.js +349 -5
- package/dist/src/rules/owasp.d.ts +5 -1
- package/dist/src/rules/owasp.js +74 -29
- package/dist/src/rules/stack.js +4 -1
- package/dist/src/rules/standards.js +11 -6
- package/dist/src/types.d.ts +2 -0
- package/docs/README.md +1 -1
- package/docs/agents.md +3 -1
- package/docs/frameworks.md +12 -12
- package/docs/rules.md +182 -6
- package/package.json +42 -42
|
@@ -10,16 +10,16 @@ export const owaspLlm = {
|
|
|
10
10
|
return null;
|
|
11
11
|
},
|
|
12
12
|
obligations: [
|
|
13
|
-
{ ref: "LLM01:2026", title: "Prompt Injection", inCode: "partly", rules: ["llm.user-input-in-system-prompt", "agent.instructions-unsafe", "llm.client-controls-system"],
|
|
13
|
+
{ ref: "LLM01:2026", title: "Prompt Injection", inCode: "partly", rules: ["llm.user-input-in-system-prompt", "agent.instructions-unsafe", "llm.client-controls-system", "mcp.tool-description-poisoned"],
|
|
14
14
|
plain: "User text, web pages or files can carry instructions that change what the model does. Keep instructions and user content apart, and limit what the model can do.",
|
|
15
15
|
evidence: "How prompts are built, and tests with hostile input." },
|
|
16
16
|
{ ref: "LLM02:2026", title: "Sensitive Information Disclosure", inCode: "partly", rules: ["secret.in-source", "secret.public-env", "pii.logged", "log.secret"],
|
|
17
17
|
plain: "Keys, personal data and internal details must not reach the model, its logs or its answers unless they're meant to.",
|
|
18
18
|
evidence: "What data is sent to the model provider, and the provider's data retention terms." },
|
|
19
|
-
{ ref: "LLM03:2026", title: "Excessive Agency", inCode: "partly", rules: ["agent.permissions-allow-all"],
|
|
19
|
+
{ ref: "LLM03:2026", title: "Excessive Agency", inCode: "partly", rules: ["agent.permissions-allow-all", "mcp.tool-runs-shell", "mcp.tool-uses-secret"],
|
|
20
20
|
plain: "Tools and permissions given to an agent should be the minimum it needs, with a person approving anything risky.",
|
|
21
21
|
evidence: "A list of the tools each agent can call and which need approval." },
|
|
22
|
-
{ ref: "LLM04:2026", title: "Supply Chain", inCode: "partly", rules: ["deps.unpinned-version", "deps.install-script", "agent.config-runs-remote-code"],
|
|
22
|
+
{ ref: "LLM04:2026", title: "Supply Chain", inCode: "partly", rules: ["deps.unpinned-version", "deps.install-script", "agent.config-runs-remote-code", "ml.unsafe-model-load", "mcp.config-unsafe-server"],
|
|
23
23
|
plain: "Models, datasets, plugins and packages come from others. Pin and check them like any dependency.",
|
|
24
24
|
evidence: "Where each model and dataset comes from, and its licence." },
|
|
25
25
|
{ ref: "LLM05:2026", title: "Data and Model Poisoning", inCode: "no",
|
|
@@ -23,7 +23,7 @@ export const owaspTop10 = {
|
|
|
23
23
|
plain: "Whether each endpoint checks that the record belongs to the person asking (often called IDOR). A line-by-line code check can't tell; it needs design review and testing with two accounts.",
|
|
24
24
|
evidence: "Access control tests per role, or a penetration test report." },
|
|
25
25
|
{ ref: "A02:2025", title: "Security Misconfiguration", inCode: "partly",
|
|
26
|
-
rules: ["config.debug-on", "agent.permissions-allow-all", "config.allowed-hosts-any", "config.default-secret-key", "xml.external-entities", "cors.any-origin", "session.cookie-insecure", "error.stack-to-client", "build.sourcemaps-public", "release.env-not-ignored", "k8s.privileged", "docker.socket-mounted", "graphql.introspection"],
|
|
26
|
+
rules: ["cloud.database-public", "cloud.network-open", "cloud.iam-allow-all", "cloud.function-url-no-auth", "docker.runs-as-root", "docker.image-unpinned", "docker.secret-in-build", "config.debug-on", "agent.permissions-allow-all", "config.allowed-hosts-any", "config.default-secret-key", "xml.external-entities", "cors.any-origin", "session.cookie-insecure", "error.stack-to-client", "build.sourcemaps-public", "release.env-not-ignored", "k8s.privileged", "docker.socket-mounted", "graphql.introspection"],
|
|
27
27
|
plain: "Safe settings by default: debug off, real host names, strong secret keys, cookies marked secure, XML parsers that don't load outside files, and errors that don't reveal internals.",
|
|
28
28
|
evidence: "Production configuration and a hardening checklist." },
|
|
29
29
|
{ ref: "A02:2025 (deployed settings)", title: "Server, cloud and header configuration in production", inCode: "no",
|
|
@@ -55,14 +55,14 @@ export const owaspTop10 = {
|
|
|
55
55
|
plain: "Thinking through how a feature could be misused before building it: rate limits, business rule abuse, trust boundaries. Code checks can't show whether this happened.",
|
|
56
56
|
evidence: "Threat models or security design reviews for key features." },
|
|
57
57
|
{ ref: "A07:2025", title: "Authentication Failures", inCode: "partly",
|
|
58
|
-
rules: ["auth.hardcoded-password", "jwt.no-expiry", "jwt.unverified", "config.default-secret-key", "session.cookie-insecure", "secret.in-source", "transport.tls-verify-off", "auth.no-rate-limit", "jwt.no-algorithm-pin", "jwt.weak-secret"],
|
|
58
|
+
rules: ["auth.hardcoded-password", "config.default-service-password", "jwt.no-expiry", "jwt.unverified", "config.default-secret-key", "session.cookie-insecure", "secret.in-source", "transport.tls-verify-off", "auth.no-rate-limit", "jwt.no-algorithm-pin", "jwt.weak-secret"],
|
|
59
59
|
plain: "Logins and sessions that hold up: no passwords in code, strong secrets, tokens that expire and are verified, and session cookies protected from scripts and plain HTTP.",
|
|
60
60
|
evidence: "Login, session and token settings." },
|
|
61
61
|
{ ref: "A07:2025 (login protections)", title: "Brute-force protection, MFA and account recovery", inCode: "no",
|
|
62
62
|
plain: "Rate limiting and lockout on login, multi-factor authentication, and safe password reset flows. These need testing against the running app.",
|
|
63
63
|
evidence: "Login rate limit settings, MFA options, and password reset flow tests." },
|
|
64
64
|
{ ref: "A08:2025", title: "Software or Data Integrity Failures", inCode: "partly",
|
|
65
|
-
rules: ["deserialize.unsafe", "html.script-no-sri", "mass-assignment", "cookie.trusted-role", "ci.prt-checkout-head", "proto.pollution"],
|
|
65
|
+
rules: ["deserialize.unsafe", "ml.unsafe-model-load", "html.script-no-sri", "mass-assignment", "cookie.trusted-role", "ci.prt-checkout-head", "proto.pollution"],
|
|
66
66
|
plain: "Don't trust code or data you haven't checked: no unsafe deserialisation, integrity checks on third-party scripts, and no trust in values users can change.",
|
|
67
67
|
evidence: "How third-party scripts are loaded and how incoming data is parsed." },
|
|
68
68
|
{ ref: "A08:2025 (signed releases)", title: "Signed builds and updates", inCode: "no",
|
package/dist/src/rules/cra.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { Control, Rule } from "../types.js";
|
|
2
2
|
/** CRA controls for rules that already exist. Merged by id in rules/index.ts. */
|
|
3
3
|
export declare const craForExisting: Record<string, Control[]>;
|
|
4
|
+
/** CI lines where a security scan can't fail the build: `|| true`, a soft-fail flag, or continue-on-error on the scan's step. Pure. */
|
|
5
|
+
export declare function scanCannotFail(lines: string[]): number[];
|
|
6
|
+
/** A package source that can be swapped under you. Gap for plain HTTP or TLS checks off; Partial for a second index. Pure. */
|
|
7
|
+
export declare function unsafeSource(l: string): boolean | "partial";
|
|
4
8
|
export declare const craRules: Rule[];
|
|
5
9
|
/** Lines in a GitHub Actions `run:` step that paste text an outsider controls. Pure. */
|
|
6
10
|
export declare function untrustedInRun(lines: string[]): number[];
|
package/dist/src/rules/cra.js
CHANGED
|
@@ -25,7 +25,57 @@ const UNTRUSTED = /\$\{\{\s*github\.(head_ref|event\.(issue|pull_request|comment
|
|
|
25
25
|
const BINARY = /\.(exe|dll|so|dylib|jar|class|pyc|o|a|bin|msi|apk)$/i;
|
|
26
26
|
const UPDATER = /^\.github\/dependabot\.ya?ml$|(^|\/)(renovate\.json5?|\.renovaterc(\.json)?)$|^\.github\/renovate\.json5?$/;
|
|
27
27
|
const FIXES = P2("2", "Vulnerabilities fixed without delay");
|
|
28
|
+
// Security scanners people wire into CI. A scan whose failure is thrown away gates nothing.
|
|
29
|
+
// A scanner's name inside a path (/opt/hostedtoolcache/CodeQL) is not a scan.
|
|
30
|
+
const SCANNER = /(?<![\/.\w-])(trivy|semgrep|gitleaks|trufflehog|snyk|grype|checkov|tfsec|bandit|osv-scanner|pip-audit|codeql|dependency-check|zap-baseline|(npm|yarn|pnpm)\s+audit|safety\s+check)\b/i;
|
|
31
|
+
const CI_FILES = /(^|\/)(\.github\/workflows\/|\.gitlab-ci|\.circleci\/|azure-pipelines|bitbucket-pipelines|\.buildkite\/)/;
|
|
32
|
+
/** CI lines where a security scan can't fail the build: `|| true`, a soft-fail flag, or continue-on-error on the scan's step. Pure. */
|
|
33
|
+
export function scanCannotFail(lines) {
|
|
34
|
+
return lines.flatMap((l, i) => {
|
|
35
|
+
if (/^\s*#/.test(l))
|
|
36
|
+
return [];
|
|
37
|
+
// Output written to a file is a report collected for a later step, not a result thrown away (review: 4 of 4).
|
|
38
|
+
if (SCANNER.test(l) && /\|\|\s*(true\b|exit\s+0\b|:\s*$|echo\b)|--exit-code[= ]0\b|--soft-fail\b|--no-fail\b/.test(l))
|
|
39
|
+
return /\s>\s*\S/.test(l.replace(/[12]?>\s*(&1|\/dev\/null)/g, "")) ? [] : [i + 1];
|
|
40
|
+
// continue-on-error belongs to a step: look a few lines either side, stopping at the next step.
|
|
41
|
+
if (!/^\s*(continue-on-error|allow_failure)\s*:\s*true\b/.test(l))
|
|
42
|
+
return [];
|
|
43
|
+
const from = lines.slice(Math.max(0, i - 6), i).reverse(), to = lines.slice(i + 1, i + 7);
|
|
44
|
+
const cut = (xs) => { const k = xs.findIndex((x) => /^\s*-\s+(name|uses|run)\s*:/.test(x)); return k < 0 ? xs : xs.slice(0, k + 1); };
|
|
45
|
+
const before = cut(from), after = to.slice(0, Math.max(0, to.findIndex((x) => /^\s*-\s+(name|uses|run)\s*:/.test(x)) < 0 ? to.length : to.findIndex((x) => /^\s*-\s+(name|uses|run)\s*:/.test(x))));
|
|
46
|
+
// In a `uses:` line the scanner's name is part of the action's path (aquasecurity/trivy-action).
|
|
47
|
+
// Uploading a report, or a step named for installing the tool, is not the scan.
|
|
48
|
+
if ([...before, ...after].some((x) => /upload-sarif|^\s*-?\s*name\s*:.*\binstall/i.test(x)))
|
|
49
|
+
return [];
|
|
50
|
+
return [...before, ...after].some((x) => SCANNER.test(x) || /\buses:.*(trivy|semgrep|gitleaks|trufflehog|snyk|codeql|checkov|grype)/i.test(x)) ? [i + 1] : [];
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
// Public indexes people add on purpose and that hold their own package names (GPU builds of PyTorch and friends).
|
|
54
|
+
const KNOWN_INDEX = /download\.pytorch\.org|pypi\.org|pypi\.nvidia\.com|test\.pypi\.org/;
|
|
55
|
+
/** A package source that can be swapped under you. Gap for plain HTTP or TLS checks off; Partial for a second index. Pure. */
|
|
56
|
+
export function unsafeSource(l) {
|
|
57
|
+
if (/^\s*(#|\/\/)/.test(l))
|
|
58
|
+
return false;
|
|
59
|
+
if (/(^|\s)(--index-url|-i|--extra-index-url)[= ]\s*http:\/\/(?!localhost|127\.0\.0\.1)|^\s*(@[\w-]+:)?registry\s*=\s*http:\/\/(?!localhost|127\.0\.0\.1)|^\s*(extra-)?index-url\s*=\s*http:\/\/(?!localhost|127\.0\.0\.1)/.test(l))
|
|
60
|
+
return true;
|
|
61
|
+
if (/^\s*strict-ssl\s*=\s*false\b|\bnpm\s+config\s+set\s+strict-ssl\s+false\b/.test(l))
|
|
62
|
+
return true;
|
|
63
|
+
if (/(^|\s)--trusted-host[= ]\s*(?!localhost|127\.0\.0\.1)\S|^\s*trusted-host\s*=\s*(?!localhost|127\.0\.0\.1)\S/.test(l))
|
|
64
|
+
return "partial";
|
|
65
|
+
// pip takes the highest version from any index, so a public package with an internal name wins (dependency confusion).
|
|
66
|
+
return /(^|\s)--extra-index-url[= ]\s*\S|^\s*extra-index-url\s*=\s*\S/.test(l) && !KNOWN_INDEX.test(l) ? "partial" : false;
|
|
67
|
+
}
|
|
28
68
|
export const craRules = [
|
|
69
|
+
{ id: "ci.scan-cannot-fail", title: "Security scan in CI that can never fail the build", status: "partial", severity: "low", controls: [UPDATES, A03],
|
|
70
|
+
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.",
|
|
71
|
+
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.",
|
|
72
|
+
extensions: [".yml", ".yaml"], pathMatch: CI_FILES, fileTest: scanCannotFail, ...DRAFT },
|
|
73
|
+
{ id: "deps.unsafe-source", title: "Packages fetched from a source that can be swapped", status: "gap", severity: "medium", controls: [COMPONENTS, A03, A08],
|
|
74
|
+
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.",
|
|
75
|
+
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.",
|
|
76
|
+
extensions: [".txt", ".conf", ".cfg", ".ini", ".toml", ".sh", ".bash", ".yml", ".yaml", ""],
|
|
77
|
+
fileName: /^(requirements[\w.-]*\.txt|constraints[\w.-]*\.txt|pip\.(conf|ini)|\.npmrc|\.yarnrc|pyproject\.toml|setup\.cfg)$|\.(sh|bash|ya?ml)$|^(Dockerfile|Containerfile)|\.Dockerfile$/i,
|
|
78
|
+
test: unsafeSource, ...DRAFT },
|
|
29
79
|
{ id: "repo.no-security-policy", title: "No way for people to report a vulnerability", status: "partial", severity: "medium", controls: [DISCLOSURE],
|
|
30
80
|
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.",
|
|
31
81
|
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.",
|
|
@@ -37,18 +87,23 @@ export const craRules = [
|
|
|
37
87
|
{ id: "update.unverified-download", title: "Downloaded script run without a check", status: "partial", severity: "medium", controls: [UPDATES, A03, A08],
|
|
38
88
|
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.",
|
|
39
89
|
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.",
|
|
40
|
-
extensions: [".sh", ".bash", ".yml", ".yaml", ""], fileName: /\.(sh|bash|ya?ml)$|^Dockerfile
|
|
90
|
+
extensions: [".sh", ".bash", ".yml", ".yaml", ""], fileName: /\.(sh|bash|ya?ml)$|^(Dockerfile|Containerfile)|\.Dockerfile$/i,
|
|
41
91
|
// Quoted text is dropped first: `echo "Install via: curl ... | bash"` tells a person what to run, it runs nothing (field test).
|
|
42
92
|
// A script served from this machine (a CI test of the project's own installer) or an installer pinned to a version
|
|
43
93
|
// in its URL is not a moving download (0.3.9 review: 8 of 10 sampled findings were these, or prose).
|
|
44
94
|
test: (l) => /\b(curl|wget)\b[^|#\n]*\|\s*(sudo\s+)?(-\S+\s+)*(ba|z|da)?sh\b/.test(l.replace(/"(?:\\.|[^"\\])*"|'[^']*'/g, '""'))
|
|
45
95
|
&& !/\b(localhost|127\.0\.0\.1|0\.0\.0\.0)\b/.test(l) && !/https?:\/\/\S*\/v?\d+\.\d+(\.\d+)?\/\S*install/.test(l),
|
|
96
|
+
// The URL is a variable set to this machine a few lines up: BASE_URL=http://127.0.0.1:8765, then curl "$BASE_URL/get.sh" | bash.
|
|
97
|
+
// shortcut: any such assignment within 8 lines counts, tie it to the variable the curl uses if that ever hides a real one.
|
|
98
|
+
unlessNear: /^\s*(export\s+)?[A-Za-z_]\w*=["']?https?:\/\/(localhost|127\.0\.0\.1)\b/,
|
|
46
99
|
// YAML is only run as a script in CI and compose files; elsewhere (manifests, risk registers) it is prose.
|
|
47
100
|
unlessPath: /^(?!.*(\.github\/workflows|\.gitlab-ci|\.circleci|bitbucket-pipelines|azure-pipelines|\.buildkite|docker-compose|(^|\/)compose\.)).*\.ya?ml$/i, ...DRAFT },
|
|
48
101
|
{ id: "ci.write-all-permissions", title: "Workflow gives its token write access to everything", status: "gap", severity: "medium", controls: [UPDATES, A03],
|
|
49
102
|
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.",
|
|
50
103
|
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.",
|
|
51
|
-
extensions: [".yml", ".yaml"], pathMatch: WORKFLOWS, test: (l) => /^\s*permissions:\s*["']?write-all\b/.test(l),
|
|
104
|
+
extensions: [".yml", ".yaml"], pathMatch: WORKFLOWS, test: (l) => /^\s*permissions:\s*["']?write-all\b/.test(l),
|
|
105
|
+
// A pull_request_target workflow with no permissions block at all gets the repository default, which is often write.
|
|
106
|
+
fileTest: (lines) => (lines.some((l) => /^\s*permissions\s*:/.test(l)) ? [] : lines.flatMap((l, i) => (/^\s*(-\s*)?pull_request_target\b|^\s*on\s*:.*\bpull_request_target\b/.test(l) ? [{ line: i + 1, status: "partial" }] : []))), ...DRAFT },
|
|
52
107
|
{ id: "ci.script-injection", title: "Text from a pull request or issue pasted into a workflow command", status: "gap", severity: "high", controls: [UPDATES, A03, A08],
|
|
53
108
|
fix: "Pass the value through an environment variable instead, for example `env: TITLE: ${{ github.event.issue.title }}` and then use \"$TITLE\" in the script.",
|
|
54
109
|
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.",
|
|
@@ -56,7 +111,7 @@ export const craRules = [
|
|
|
56
111
|
{ id: "repo.binary-committed", title: "Compiled program committed to the repository", status: "partial", severity: "low", controls: [COMPONENTS],
|
|
57
112
|
fix: "Remove the file and build it from source in CI, or download it at build time from a release with a checksum.",
|
|
58
113
|
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.",
|
|
59
|
-
extensions: [], repoTest: (files) => files.find((f) => BINARY.test(f) && !/gradle-wrapper\.jar$/.test(f)) ?? null, ...DRAFT },
|
|
114
|
+
extensions: [], repoTest: (files) => files.find((f) => BINARY.test(f) && !/gradle-wrapper\.jar$/.test(f) && !/(^|\/)(tests?|__tests__|spec|fixtures?|__fixtures__|testdata|test-data|e2e|examples?|samples?)\//i.test(f)) ?? null, ...DRAFT },
|
|
60
115
|
{ id: "repo.no-dependency-updates", title: "No automated dependency updates", status: "partial", severity: "low", controls: [FIXES],
|
|
61
116
|
fix: "Turn on Dependabot (add .github/dependabot.yml) or Renovate (renovate.json), so security fixes in your dependencies reach you as pull requests.",
|
|
62
117
|
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.",
|
|
@@ -66,8 +121,23 @@ export const craRules = [
|
|
|
66
121
|
export function untrustedInRun(lines) {
|
|
67
122
|
const out = [];
|
|
68
123
|
let runIndent = -1; // indent of the `run: |` key while inside its block
|
|
124
|
+
// A job that only runs for people with write access gets its PR fields from trusted authors (0.3.14 review).
|
|
125
|
+
// shortcut: a step-level `if` counts for the rest of its job too, read job and step conditions apart if that misleads.
|
|
126
|
+
let trusted = false;
|
|
69
127
|
lines.forEach((l, i) => {
|
|
70
128
|
const indent = l.search(/\S/);
|
|
129
|
+
if (/^ {2}[\w-]+:\s*(#.*)?$/.test(l))
|
|
130
|
+
trusted = false; // next job
|
|
131
|
+
if (runIndent < 0 && /author_association\s*==\s*["'](OWNER|MEMBER|COLLABORATOR)["']/.test(l))
|
|
132
|
+
trusted = true;
|
|
133
|
+
if (trusted) {
|
|
134
|
+
if (runIndent >= 0 && indent >= 0 && indent <= runIndent)
|
|
135
|
+
runIndent = -1;
|
|
136
|
+
const r = /^(\s*-?\s*)(?:run|script):\s*[|>][-+]?\s*$/.exec(l);
|
|
137
|
+
if (r)
|
|
138
|
+
runIndent = r[1].length;
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
71
141
|
if (runIndent >= 0 && indent >= 0 && indent <= runIndent)
|
|
72
142
|
runIndent = -1;
|
|
73
143
|
// Also `script:` in actions/github-script, where the text becomes JavaScript instead of shell (review P17).
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { Rule } from "../types.js";
|
|
2
|
+
export declare const MASKED: RegExp;
|
|
3
|
+
/** Shannon entropy in bits per character. Real keys are random (about 4 and up); aaaa... or xxxx... is near 0. Pure. */
|
|
4
|
+
export declare function entropy(s: string): number;
|
|
2
5
|
/** A Supabase (or any) JWT whose payload says role: service_role. Decoded exactly, so near-zero false alarms. Pure. */
|
|
3
6
|
export declare function serviceRoleJwt(l: string): boolean;
|
|
4
7
|
/** A database connection URL with an inline password that isn't a local default or a placeholder. Pure. */
|
package/dist/src/rules/index.js
CHANGED
|
@@ -12,7 +12,9 @@ const LOG_CALL = /\b(console\.(log|info|warn|error|debug)|logger\.\w+|log\.(info
|
|
|
12
12
|
// exponentially on text such as an array of regular expressions (found when statements were joined).
|
|
13
13
|
const codeOnly = (l) => l.replace(/(["'`])(?:\\.|(?!\1)[^\\])*\1/g, (s) => (s.match(/\{[^}]*\}/g) ?? []).join(" "));
|
|
14
14
|
// Helpers that hide the raw value before it is logged.
|
|
15
|
-
|
|
15
|
+
// Certificate or host-name checks switched off in Java, Kotlin, Dart and Python.
|
|
16
|
+
const NATIVE_TLS_OFF = /\bALLOW_ALL_HOSTNAME_VERIFIER\b|\b(setHostnameVerifier|hostnameVerifier)\s*[({]\s*\{?\s*\(?\s*\w+\s*,\s*\w+\s*\)?\s*->\s*true\b|\bHostnameVerifier\s*\{\s*\w+\s*,\s*\w+\s*->\s*true\s*\}|\bbadCertificateCallback\s*=\s*\([^)]*\)\s*=>\s*true|\bonReceivedSslError\b[^\n]*\.proceed\(\)|\b_create_unverified_context\(/;
|
|
17
|
+
export const MASKED = /\b\w*(mask|hash|pseudonym|redact|anonymi[sz]e|obfuscate|scrub)\w*\s*\(/i;
|
|
16
18
|
const PII = /\b(e-?mail|phone|ssn|social_?security|passport|date_?of_?birth|dob|password|passwd|credit_?card|card_?number|iban)\b/i;
|
|
17
19
|
// The arguments of the first log call on a line, up to its matching ")". Other code on the same line is ignored.
|
|
18
20
|
function logArgs(l) {
|
|
@@ -30,7 +32,7 @@ function logArgs(l) {
|
|
|
30
32
|
}
|
|
31
33
|
// Values that usually come from a request or the user. SQL built from them is a Gap; from other values, Partial.
|
|
32
34
|
const USER_INPUT = /\b(req|request|params|query|body|input|args|form|ctx|event|payload|searchParams|user_input)\b/;
|
|
33
|
-
const SQL_PARTS = /\$\{([^}]*)\}|\bf["
|
|
35
|
+
const SQL_PARTS = /\$\{([^}]*)\}|\bf"[^"]*?\{([^}]*)\}|\bf'[^']*?\{([^}]*)\}|["']\s*\+\s*([\w.[\]]+)|\.format\(([^)]*)\)|%s'?["']\s*%\s*([^\n]+)/g;
|
|
34
36
|
// Key formats with a fixed, documented prefix, so a match is almost never anything else. Written from each
|
|
35
37
|
// provider's published token format. Generic "key = random string" guessing is left out on purpose: too noisy.
|
|
36
38
|
const KEY_FORMATS = new RegExp([
|
|
@@ -48,7 +50,25 @@ const KEY_FORMATS = new RegExp([
|
|
|
48
50
|
"-----BEGIN (RSA |EC |DSA |OPENSSH |ENCRYPTED )?PRIVATE KEY-----", "-----BEGIN PGP PRIVATE KEY BLOCK-----",
|
|
49
51
|
].join("|"));
|
|
50
52
|
// Example values from provider docs (AKIAIOSFODNN7EXAMPLE and the like) and obvious fill-ins.
|
|
51
|
-
const DOC_EXAMPLE = /EXAMPLE|X{6,}|x{6,}|0{12,}|1234567890abcdef/;
|
|
53
|
+
const DOC_EXAMPLE = /EXAMPLE|X{6,}|x{6,}|0{12,}|1234567890abcdef|abc123/;
|
|
54
|
+
/** Shannon entropy in bits per character. Real keys are random (about 4 and up); aaaa... or xxxx... is near 0. Pure. */
|
|
55
|
+
export function entropy(s) {
|
|
56
|
+
const n = {};
|
|
57
|
+
for (const c of s)
|
|
58
|
+
n[c] = (n[c] ?? 0) + 1;
|
|
59
|
+
return -Object.values(n).reduce((h, k) => h + (k / s.length) * Math.log2(k / s.length), 0);
|
|
60
|
+
}
|
|
61
|
+
// A PEM header with no key body after it: in a comment, or text a program builds a key around at runtime (field-test review).
|
|
62
|
+
const PEM_NO_BODY = /^\s*(#|\/\/|\*|<!--|--\s)|PRIVATE KEY( BLOCK)?-----(\\n)?["'`]\s*(\+|\.join|,|\))/;
|
|
63
|
+
// A key written inside one string that ends on the same line, with a body too short or too regular to be a key: a redaction
|
|
64
|
+
// test's "CanaryLineOne", a cut-off sample. The shortest real key (Ed25519) has 64 base64 characters (0.3.14 review: 17 of 17).
|
|
65
|
+
const pemInlineFake = (l) => {
|
|
66
|
+
const after = l.slice(l.indexOf("PRIVATE KEY")).replace(/^PRIVATE KEY( BLOCK)?-----/, "");
|
|
67
|
+
const body = after.split("-----END")[0].replace(/\\+[nr]|[^A-Za-z0-9+/=]/g, "");
|
|
68
|
+
return /-----END|["'`]\s*[,;)\]}]*\s*$/.test(after) && (body.length < 64 || /abcdefghijklmnop/.test(body));
|
|
69
|
+
};
|
|
70
|
+
// A "secret" whose base64 reads as a sentence is documentation ("This is an example of a shorter Base64 string").
|
|
71
|
+
const readsAsText = (key) => /^(?=.* )[\x20-\x7e]{12,}$/.test(Buffer.from(key.slice(key.lastIndexOf("_") + 1), "base64").toString("latin1"));
|
|
52
72
|
// More fixed-prefix secrets this audience leaks: Stripe webhook secrets, Supabase secret keys, Resend keys (review P13).
|
|
53
73
|
const MORE_KEYS = /\bwhsec_[0-9A-Za-z]{24,}|\bsb_secret_[0-9A-Za-z_-]{20,}|\bre_[0-9A-Za-z]{8,}_[0-9A-Za-z]{16,}/;
|
|
54
74
|
/** A Supabase (or any) JWT whose payload says role: service_role. Decoded exactly, so near-zero false alarms. Pure. */
|
|
@@ -93,6 +113,9 @@ export const rules = [
|
|
|
93
113
|
// A value passed through a masking or hashing helper first (maskEmail(), pseudonym(), hash()) is not the raw value:
|
|
94
114
|
// every false alarm on 56 new repos in the 0.3.9 review was masked this way (12 of 12).
|
|
95
115
|
test: (l) => { const a = logArgs(l); return a !== null && !l.includes("::add-mask::") && PII.test(codeOnly(a)) && !MASKED.test(a); },
|
|
116
|
+
// A command-line tool prints to the terminal of the person running it, not to a log store: "Logged in as <email>"
|
|
117
|
+
// after a login is the point of the command (5 of the 12 false alarms still shown in 0.3.14; no real one was in a CLI).
|
|
118
|
+
unlessPath: /(^|\/)cli\/|(^|\/)(packages|apps)\/[^/]*cli[^/]*\//i,
|
|
96
119
|
...DRAFT,
|
|
97
120
|
},
|
|
98
121
|
{
|
|
@@ -114,12 +137,17 @@ export const rules = [
|
|
|
114
137
|
const m = l.match(KEY_FORMATS) ?? l.match(MORE_KEYS);
|
|
115
138
|
// Placeholders say so: xoxb-your-bot-token, ghp_...fake..., a PEM header followed by "...", or by prose
|
|
116
139
|
// ("starts with -----BEGIN PRIVATE KEY----- and"). 0 of 7 sampled secret findings were real (0.3.9 review).
|
|
117
|
-
|
|
140
|
+
const pem = !!m && /-----BEGIN/.test(m[0]);
|
|
141
|
+
// The part after a fixed prefix must look random: ghp_aaaaaaaa... is a fill-in, not a token.
|
|
142
|
+
const tooRegular = !!m && !pem && entropy(m[0].replace(/^[A-Za-z]+[_-]+(?:[a-z]+[_-]+)?/, "")) < 3;
|
|
143
|
+
if (pem && (PEM_NO_BODY.test(l) || pemInlineFake(l)))
|
|
144
|
+
return serviceRoleJwt(l) || dbUrlWithPassword(l);
|
|
145
|
+
return (!!m && !tooRegular && !DOC_EXAMPLE.test(m[0]) && (pem || !readsAsText(m[0])) && !/your[-_]|fake|dummy|placeholder|changeme|sample/.test(m[0]) /* lowercase words: real keys are random */
|
|
118
146
|
&& !/PRIVATE KEY( BLOCK)?-----(["'`]|\.\.\.|\\n\s*\.\.\.|\s+[a-zA-Z])/.test(l)) || serviceRoleJwt(l) || dbUrlWithPassword(l);
|
|
119
147
|
},
|
|
120
148
|
// Translation files mention "API key" and "secret" in every language, never a real key. Type definition files
|
|
121
149
|
// carry documentation examples, and secret-scanner configs list known test keys on purpose (0.3.9 review).
|
|
122
|
-
unlessPath: /(^|\/)(locales?|i18n|translations?|lang)\/|\.d\.ts$|(^|\/)(\.gitleaks\.toml|\.secrets\.baseline|\.trufflehog\.ya?ml)$/i,
|
|
150
|
+
unlessPath: /(^|\/)(locales?|i18n|translations?|lang)\/|\.d\.ts$|(^|\/)(\.gitleaks\.toml|\.gitleaksignore|\.secrets\.baseline|\.trufflehog\.ya?ml)$/i,
|
|
123
151
|
...DRAFT,
|
|
124
152
|
},
|
|
125
153
|
{
|
|
@@ -133,7 +161,7 @@ export const rules = [
|
|
|
133
161
|
note: "Marked Partial: the call may carry no sensitive data. Confirm, then switch to HTTPS anyway.",
|
|
134
162
|
extensions: CODE,
|
|
135
163
|
// Loopback, private ranges and single-label service names (http://redis:6379) stay on the machine or network (field test).
|
|
136
|
-
test: (l) => /\b(fetch|axios\.\w+|requests\.\w+|http\.(get|request))\s*\(\s*["'`]http:\/\/(?!localhost|127\.|0\.0\.0\.0|10\.|192\.168\.|172\.(1[6-9]|2\d|3[01])\.|\[::1\]|host\.docker\.internal)[\w-]+\.[\w.-]+/.test(l),
|
|
164
|
+
test: (l) => /\b(fetch|axios\.\w+|requests\.\w+|http\.(get|request))\s*\(\s*["'`]http:\/\/(?!localhost|127\.|0\.0\.0\.0|10\.|192\.168\.|172\.(1[6-9]|2\d|3[01])\.|\[::1\]|host\.docker\.internal|[\w.-]+\.(test|example|invalid|localhost)(?![\w.-]))[\w-]+\.[\w.-]+/.test(l),
|
|
137
165
|
...DRAFT,
|
|
138
166
|
},
|
|
139
167
|
{
|
|
@@ -148,7 +176,9 @@ export const rules = [
|
|
|
148
176
|
extensions: CODE,
|
|
149
177
|
// Also a bare track("event", { ... }), the way @vercel/analytics and similar SDKs are imported and called.
|
|
150
178
|
test: (l) => (/\b(posthog|analytics|mixpanel|amplitude|segment|heap|gtag|ga|intercom|hotjar|sentry)\.(identify|track|capture|people\.set|setUser|setUserProperties|register)\s*\(/i.test(l)
|
|
151
|
-
|| /(^|[^.\w])track\s*\(\s*["'`][^"'`]+["'`]\s*,\s*\{/.test(l)) && PII.test(l),
|
|
179
|
+
|| /(^|[^.\w])track\s*\(\s*["'`][^"'`]+["'`]\s*,\s*\{/.test(l)) && PII.test(l.replace(/:\s*["'][\w -]*["']/g, ": 0")),
|
|
180
|
+
// Sent only inside a branch that checks the person opted in (0.3.14 review).
|
|
181
|
+
unlessNear: /\bif\b.*\b(opted_?[iI]n|has_?[cC]onsent|consent(Given|ed)?)\b/,
|
|
152
182
|
...DRAFT,
|
|
153
183
|
},
|
|
154
184
|
{
|
|
@@ -194,8 +224,11 @@ export const rules = [
|
|
|
194
224
|
],
|
|
195
225
|
fix: "Remove the override and trust a proper certificate. For self-signed certs in tests, scope it to the test only.",
|
|
196
226
|
note: "With checks off, anyone on the network path can read or change the traffic.",
|
|
197
|
-
|
|
198
|
-
|
|
227
|
+
// Scripts and Dockerfiles switch the check off too: curl -k, curl --insecure, wget --no-check-certificate.
|
|
228
|
+
extensions: [...CODE, ".env", ".sh", ".bash", "", ".java", ".kt", ".swift", ".go", ".dart"],
|
|
229
|
+
test: (l) => (/\bcurl\b[^|;&\n]*\s(-[sSfLIvO#]*k[sSfLIvO#]*|--insecure)(\s|$)|\bwget\b[^|;&\n]*--no-check-certificate\b/.test(l) && !/^\s*#|localhost|127\.0\.0\.1/.test(l)) || NATIVE_TLS_OFF.test(l) || /rejectUnauthorized\s*:\s*false|NODE_TLS_REJECT_UNAUTHORIZED\s*[=:]\s*["']?0|\b(requests|httpx|session|client|Client|AsyncClient|urlopen)\b.*\bverify\s*=\s*False|InsecureSkipVerify\s*:\s*true|verify_mode\s*=\s*ssl\.CERT_NONE|cert_reqs\s*=\s*ssl\.CERT_NONE/.test(l), // naming CERT_NONE in a settings map isn't switching it on
|
|
230
|
+
// A host-name check switched off on its own. Next to CERT_NONE the neighbouring line already reports it (review: 8 of 8 were doubles).
|
|
231
|
+
fileTest: (lines) => lines.flatMap((l, i) => (/\bcheck_hostname\s*=\s*False\b/.test(l) && !/CERT_NONE/.test([lines[i - 1], lines[i + 1], lines[i + 2]].join(" ")) ? [i + 1] : [])),
|
|
199
232
|
// Only the switches with one safe opposite; env vars and ssl modes need a person.
|
|
200
233
|
patch: (l) => l.replace(/rejectUnauthorized(\s*):(\s*)false/, "rejectUnauthorized$1:$2true").replace(/\bverify(\s*)=(\s*)False\b/, "verify$1=$2True").replace(/InsecureSkipVerify(\s*):(\s*)true/, "InsecureSkipVerify$1:$2false"),
|
|
201
234
|
...DRAFT,
|
|
@@ -218,7 +251,9 @@ export const rules = [
|
|
|
218
251
|
return false;
|
|
219
252
|
if (/\b(throw|Error|message|msg)\b/.test(l) && !/\.(query|execute|exec|raw|run|prepare|all|get)\s*\(/.test(l))
|
|
220
253
|
return false;
|
|
221
|
-
|
|
254
|
+
// Every {…} in a Python f-string counts, not only the first: f"UPDATE {table} SET … WHERE {where}" (field test).
|
|
255
|
+
const fParts = [...l.matchAll(/\bf(["'])((?:(?!\1).)*)\1/g)].flatMap((m) => [...m[2].matchAll(/\{([^}]*)\}/g)].map((x) => x[1]));
|
|
256
|
+
const parts = [...[...l.matchAll(SQL_PARTS)].map((m) => m.slice(1).find(Boolean) ?? ""), ...fParts];
|
|
222
257
|
if (!parts.length)
|
|
223
258
|
return false;
|
|
224
259
|
if (parts.some((p) => USER_INPUT.test(p)))
|
|
@@ -245,6 +280,8 @@ export const rules = [
|
|
|
245
280
|
fileTest: (lines) => lines.flatMap((l, i) => {
|
|
246
281
|
if (!/Access-Control-Allow-Origin["']?\s*[,:]\s*(["']\*["']|[\w.]*(req|request)\.headers?(\.get\(|\[|\.)\s*["']?origin)|origin\s*:\s*(["']\*["']|true\b|[\w.]*(req|request)\.headers?\.origin)|CORS_ALLOW_ALL_ORIGINS\s*=\s*True|CORS_ORIGIN_ALLOW_ALL\s*=\s*True|allow_origins\s*=\s*\[\s*["']\*["']|allow_origin_regex\s*=\s*["']\.\*/.test(l))
|
|
247
282
|
return [];
|
|
283
|
+
if (/credentials["']?\s*[:=]\s*["']?false|allow_credentials\s*=\s*False|CORS_ALLOW_CREDENTIALS\s*=\s*False/i.test(lines.slice(Math.max(0, i - 3), i + 9).join("\n")))
|
|
284
|
+
return [];
|
|
248
285
|
const near = lines.slice(Math.max(0, i - 12), i + 13).join("\n");
|
|
249
286
|
return /credentials["']?\s*[:=,]\s*["']?true|Allow-Credentials["']?\s*[,:]\s*["']?true|CORS_ALLOW_CREDENTIALS\s*=\s*True|allow_credentials\s*=\s*True|supports_credentials\s*=\s*True/i.test(near) ? [i + 1] : [];
|
|
250
287
|
}),
|
|
@@ -262,6 +299,9 @@ export const rules = [
|
|
|
262
299
|
// A bare `secure: false` is usually a client, proxy or database option: it counts only near a cookie being set
|
|
263
300
|
// (0.3.9 labels: 9 of 14 false alarms had no cookie in sight). CSRF cookies are meant to be readable by scripts.
|
|
264
301
|
fileTest: (lines) => lines.flatMap((l, i) => {
|
|
302
|
+
// A session cookie set with no options at all gets neither flag.
|
|
303
|
+
if (/\bres\.cookie\(\s*["'`][\w.-]*(session|sess|sid|token|auth|jwt)[\w.-]*["'`]\s*,\s*[^,()]+\)/i.test(l) && !/csrf|xsrf/i.test(l))
|
|
304
|
+
return [i + 1];
|
|
265
305
|
if (!/\b(httpOnly|secure)\s*:\s*false\b|SESSION_COOKIE_(SECURE|HTTPONLY)\s*=\s*False/.test(l))
|
|
266
306
|
return [];
|
|
267
307
|
const near = lines.slice(Math.max(0, i - 6), i + 4).join("\n");
|
|
@@ -332,7 +372,10 @@ rules.push({
|
|
|
332
372
|
extensions: CODE,
|
|
333
373
|
// A model's output and a decision word on the same line, e.g. status = model.predict(x) > 0.5 ? "approved" : "rejected".
|
|
334
374
|
// score() and invoke() are too generic: a music score, a memory ranking (field test).
|
|
335
|
-
test: (l) => /\b(predict|predict_proba|classify|generateText|generateObject)\w*\s*\(|\.chat\.completions\.create\s*\(/.test(l) && DECISION.test(l)
|
|
375
|
+
test: (l) => /\b(predict|predict_proba|classify|generateText|generateObject)\w*\s*\(|\.chat\.completions\.create\s*\(/.test(l) && DECISION.test(l)
|
|
376
|
+
// A function being defined decides nothing yet, and allow/deny for a tool, a permission or access is an agent's
|
|
377
|
+
// permission system, not a decision about a person (0.3.14 review: 0 of 4 shown findings were about people).
|
|
378
|
+
&& !/^\s*(export\s+)?(async\s+)?(def|function)\s/.test(l) && !/\b(tool|permissions?|access)\b/.test(l),
|
|
336
379
|
...DRAFT,
|
|
337
380
|
}, {
|
|
338
381
|
id: "ai.call-not-logged",
|
|
@@ -411,9 +454,9 @@ const MEDIUM_CONFIDENCE = new Set(["xss.raw-html", "error.empty-catch", "sql.str
|
|
|
411
454
|
"ci.script-injection", "log.injection", "log.secret", "auth.hardcoded-password", "mobile.cleartext-traffic", "config.debug-on",
|
|
412
455
|
"mobile.token-in-plain-storage",
|
|
413
456
|
// 0 of 7 real in the 0.3.9 review: the data was the app's own database, cache or worker pipe.
|
|
414
|
-
"deserialize.unsafe"
|
|
415
|
-
|
|
416
|
-
|
|
457
|
+
"deserialize.unsafe"]);
|
|
458
|
+
// cors.any-origin is shown by default since 2026-11-20: it only fires on an open or reflected origin plus credentials,
|
|
459
|
+
// 7 times in 304 field-test repos, and that pairing lets any site read logged-in answers.
|
|
417
460
|
for (const r of rules)
|
|
418
461
|
if (MEDIUM_CONFIDENCE.has(r.id))
|
|
419
462
|
r.confidence = "medium";
|
package/dist/src/rules/more.d.ts
CHANGED
|
@@ -1,4 +1,33 @@
|
|
|
1
1
|
import type { Rule } from "../types.js";
|
|
2
2
|
/** Lines that start a web-socket server in a file with no origin check (verifyClient, an origin test, allowRequest). Pure. */
|
|
3
3
|
export declare function wsNoOrigin(lines: string[]): number[];
|
|
4
|
+
/** Lines matching re in a file that registers MCP tools; nothing in other files. Pure. */
|
|
5
|
+
export declare function inMcpServer(lines: string[], re: RegExp): number[];
|
|
6
|
+
/** MCP config: a server run from a version that can change after you approved it (Partial), or reached over plain HTTP (Gap). Pure.
|
|
7
|
+
* shortcut: reads npx-style args only ("-y", "pkg"); add uvx and docker image tags when a field test shows them. */
|
|
8
|
+
export declare function mcpConfigUnsafe(lines: string[]): Array<{
|
|
9
|
+
line: number;
|
|
10
|
+
status: "gap" | "partial";
|
|
11
|
+
}>;
|
|
12
|
+
/** Key sizes and work factors below what current guidance accepts. Pure. */
|
|
13
|
+
export declare function weakCryptoParameter(l: string): boolean | "partial";
|
|
14
|
+
/** Android release build that can be debugged: the manifest flag, or `debuggable true` inside the release block of build.gradle. Pure. */
|
|
15
|
+
export declare function debuggableBuild(lines: string[]): number[];
|
|
16
|
+
/** A line that declares a stored field with one of these names: SQL column, Prisma, Mongoose, Sequelize, TypeORM, Django,
|
|
17
|
+
* SQLAlchemy. A TypeScript type (`cvv: string`) describes a form value, not storage, so it doesn't count. Pure. */
|
|
18
|
+
export declare function storedField(names: string): (l: string) => boolean;
|
|
19
|
+
/** A consent or marketing checkbox that starts ticked, or its state that starts as true. Pure. */
|
|
20
|
+
export declare function consentPreticked(lines: string[]): number[];
|
|
21
|
+
/** A firewall rule that lets the whole internet reach an admin or database port. Reads the block around the open range:
|
|
22
|
+
* inbound only, and only when the ports are written there. Pure.
|
|
23
|
+
* shortcut: reads up to 10 lines either side of the range, not the parsed block; parse HCL if rules get longer. */
|
|
24
|
+
export declare function networkOpen(lines: string[]): number[];
|
|
25
|
+
/** A policy statement that allows every action on every resource. A Deny statement with the same wildcards is a guard. Pure. */
|
|
26
|
+
export declare function iamAllowAll(lines: string[]): number[];
|
|
27
|
+
/** Dockerfile whose last stage never switches away from root: the last FROM line, or its `USER root` line. Pure. */
|
|
28
|
+
export declare function dockerRunsAsRoot(lines: string[]): number[];
|
|
29
|
+
/** FROM lines with no tag or the `latest` tag. A stage name, a digest, a build argument and `scratch` are not images to pin. Pure. */
|
|
30
|
+
export declare function dockerImageUnpinned(lines: string[]): number[];
|
|
4
31
|
export declare const moreRules: Rule[];
|
|
32
|
+
/** The service password variable on this line when it's set to a well-known default, else null. Pure. */
|
|
33
|
+
export declare function defaultPasswordKey(l: string): string | null;
|