@intentius/chant-lexicon-github 0.7.0 → 0.8.0
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/codegen/docs-cli.d.ts +2 -0
- package/dist/codegen/docs-cli.d.ts.map +1 -0
- package/dist/codegen/docs.d.ts +10 -0
- package/dist/codegen/docs.d.ts.map +1 -0
- package/dist/codegen/generate-cli.d.ts +6 -0
- package/dist/codegen/generate-cli.d.ts.map +1 -0
- package/dist/codegen/generate-lexicon.d.ts +19 -0
- package/dist/codegen/generate-lexicon.d.ts.map +1 -0
- package/dist/codegen/generate-typescript.d.ts +11 -0
- package/dist/codegen/generate-typescript.d.ts.map +1 -0
- package/dist/codegen/generate.d.ts +15 -0
- package/dist/codegen/generate.d.ts.map +1 -0
- package/dist/codegen/naming.d.ts +13 -0
- package/dist/codegen/naming.d.ts.map +1 -0
- package/dist/codegen/package.d.ts +10 -0
- package/dist/codegen/package.d.ts.map +1 -0
- package/dist/codegen/parse.d.ts +56 -0
- package/dist/codegen/parse.d.ts.map +1 -0
- package/dist/codegen/patches.d.ts +21 -0
- package/dist/codegen/patches.d.ts.map +1 -0
- package/dist/composites/cache.d.ts +11 -0
- package/dist/composites/cache.d.ts.map +1 -0
- package/dist/composites/checkout.d.ts +14 -0
- package/dist/composites/checkout.d.ts.map +1 -0
- package/dist/composites/dependabot.d.ts +74 -0
- package/dist/composites/dependabot.d.ts.map +1 -0
- package/dist/composites/deploy-environment.d.ts +23 -0
- package/dist/composites/deploy-environment.d.ts.map +1 -0
- package/dist/composites/docker-build.d.ts +29 -0
- package/dist/composites/docker-build.d.ts.map +1 -0
- package/dist/composites/download-artifact.d.ts +11 -0
- package/dist/composites/download-artifact.d.ts.map +1 -0
- package/dist/composites/go-ci.d.ts +21 -0
- package/dist/composites/go-ci.d.ts.map +1 -0
- package/dist/composites/index.d.ts +29 -0
- package/dist/composites/index.d.ts.map +1 -0
- package/dist/composites/node-ci.d.ts +14 -0
- package/dist/composites/node-ci.d.ts.map +1 -0
- package/dist/composites/node-pipeline.d.ts +79 -0
- package/dist/composites/node-pipeline.d.ts.map +1 -0
- package/dist/composites/python-ci.d.ts +22 -0
- package/dist/composites/python-ci.d.ts.map +1 -0
- package/dist/composites/setup-go.d.ts +11 -0
- package/dist/composites/setup-go.d.ts.map +1 -0
- package/dist/composites/setup-node.d.ts +12 -0
- package/dist/composites/setup-node.d.ts.map +1 -0
- package/dist/composites/setup-python.d.ts +11 -0
- package/dist/composites/setup-python.d.ts.map +1 -0
- package/dist/composites/upload-artifact.d.ts +12 -0
- package/dist/composites/upload-artifact.d.ts.map +1 -0
- package/dist/coverage.d.ts +15 -0
- package/dist/coverage.d.ts.map +1 -0
- package/dist/expression.d.ts +107 -0
- package/dist/expression.d.ts.map +1 -0
- package/dist/generated/index.d.ts +24 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/runtime.d.ts +5 -0
- package/dist/generated/runtime.d.ts.map +1 -0
- package/dist/import/generator.d.ts +19 -0
- package/dist/import/generator.d.ts.map +1 -0
- package/dist/import/parser.d.ts +13 -0
- package/dist/import/parser.d.ts.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/integrity.json +2 -2
- package/dist/lint/post-synth/gha006.d.ts +8 -0
- package/dist/lint/post-synth/gha006.d.ts.map +1 -0
- package/dist/lint/post-synth/gha009.d.ts +8 -0
- package/dist/lint/post-synth/gha009.d.ts.map +1 -0
- package/dist/lint/post-synth/gha011.d.ts +8 -0
- package/dist/lint/post-synth/gha011.d.ts.map +1 -0
- package/dist/lint/post-synth/gha013.d.ts +9 -0
- package/dist/lint/post-synth/gha013.d.ts.map +1 -0
- package/dist/lint/post-synth/gha017.d.ts +8 -0
- package/dist/lint/post-synth/gha017.d.ts.map +1 -0
- package/dist/lint/post-synth/gha018.d.ts +9 -0
- package/dist/lint/post-synth/gha018.d.ts.map +1 -0
- package/dist/lint/post-synth/gha019.d.ts +9 -0
- package/dist/lint/post-synth/gha019.d.ts.map +1 -0
- package/dist/lint/post-synth/gha021.d.ts +9 -0
- package/dist/lint/post-synth/gha021.d.ts.map +1 -0
- package/dist/lint/post-synth/gha022.d.ts +9 -0
- package/dist/lint/post-synth/gha022.d.ts.map +1 -0
- package/dist/lint/post-synth/gha023.d.ts +9 -0
- package/dist/lint/post-synth/gha023.d.ts.map +1 -0
- package/dist/lint/post-synth/gha024.d.ts +9 -0
- package/dist/lint/post-synth/gha024.d.ts.map +1 -0
- package/dist/lint/post-synth/gha025.d.ts +9 -0
- package/dist/lint/post-synth/gha025.d.ts.map +1 -0
- package/dist/lint/post-synth/gha026.d.ts +10 -0
- package/dist/lint/post-synth/gha026.d.ts.map +1 -0
- package/dist/lint/post-synth/gha027.d.ts +10 -0
- package/dist/lint/post-synth/gha027.d.ts.map +1 -0
- package/dist/lint/post-synth/gha028.d.ts +9 -0
- package/dist/lint/post-synth/gha028.d.ts.map +1 -0
- package/dist/lint/post-synth/gha029.d.ts +25 -0
- package/dist/lint/post-synth/gha029.d.ts.map +1 -0
- package/dist/lint/post-synth/gha030.d.ts +10 -0
- package/dist/lint/post-synth/gha030.d.ts.map +1 -0
- package/dist/lint/post-synth/gha031.d.ts +15 -0
- package/dist/lint/post-synth/gha031.d.ts.map +1 -0
- package/dist/lint/post-synth/gha032.d.ts +10 -0
- package/dist/lint/post-synth/gha032.d.ts.map +1 -0
- package/dist/lint/post-synth/gha033.d.ts +10 -0
- package/dist/lint/post-synth/gha033.d.ts.map +1 -0
- package/dist/lint/post-synth/gha034.d.ts +12 -0
- package/dist/lint/post-synth/gha034.d.ts.map +1 -0
- package/dist/lint/post-synth/gha035.d.ts +13 -0
- package/dist/lint/post-synth/gha035.d.ts.map +1 -0
- package/dist/lint/post-synth/gha036.d.ts +12 -0
- package/dist/lint/post-synth/gha036.d.ts.map +1 -0
- package/dist/lint/post-synth/gha037.d.ts +12 -0
- package/dist/lint/post-synth/gha037.d.ts.map +1 -0
- package/dist/lint/post-synth/gha038.d.ts +11 -0
- package/dist/lint/post-synth/gha038.d.ts.map +1 -0
- package/dist/lint/post-synth/gha039.d.ts +12 -0
- package/dist/lint/post-synth/gha039.d.ts.map +1 -0
- package/dist/lint/post-synth/gha040.d.ts +11 -0
- package/dist/lint/post-synth/gha040.d.ts.map +1 -0
- package/dist/lint/post-synth/gha041.d.ts +10 -0
- package/dist/lint/post-synth/gha041.d.ts.map +1 -0
- package/dist/lint/post-synth/gha042.d.ts +10 -0
- package/dist/lint/post-synth/gha042.d.ts.map +1 -0
- package/dist/lint/post-synth/gha043.d.ts +12 -0
- package/dist/lint/post-synth/gha043.d.ts.map +1 -0
- package/dist/lint/post-synth/gha044.d.ts +10 -0
- package/dist/lint/post-synth/gha044.d.ts.map +1 -0
- package/dist/lint/post-synth/gha045.d.ts +12 -0
- package/dist/lint/post-synth/gha045.d.ts.map +1 -0
- package/dist/lint/post-synth/gha046.d.ts +13 -0
- package/dist/lint/post-synth/gha046.d.ts.map +1 -0
- package/dist/lint/post-synth/gha047.d.ts +12 -0
- package/dist/lint/post-synth/gha047.d.ts.map +1 -0
- package/dist/lint/post-synth/gha048.d.ts +12 -0
- package/dist/lint/post-synth/gha048.d.ts.map +1 -0
- package/dist/lint/post-synth/gha049.d.ts +12 -0
- package/dist/lint/post-synth/gha049.d.ts.map +1 -0
- package/dist/lint/post-synth/gha050.d.ts +12 -0
- package/dist/lint/post-synth/gha050.d.ts.map +1 -0
- package/dist/lint/post-synth/gha051.d.ts +12 -0
- package/dist/lint/post-synth/gha051.d.ts.map +1 -0
- package/dist/lint/post-synth/gha052.d.ts +11 -0
- package/dist/lint/post-synth/gha052.d.ts.map +1 -0
- package/dist/lint/post-synth/gha053.d.ts +11 -0
- package/dist/lint/post-synth/gha053.d.ts.map +1 -0
- package/dist/lint/post-synth/gha054.d.ts +11 -0
- package/dist/lint/post-synth/gha054.d.ts.map +1 -0
- package/dist/lint/post-synth/gha055.d.ts +11 -0
- package/dist/lint/post-synth/gha055.d.ts.map +1 -0
- package/dist/lint/post-synth/gha056.d.ts +10 -0
- package/dist/lint/post-synth/gha056.d.ts.map +1 -0
- package/dist/lint/post-synth/gha057.d.ts +12 -0
- package/dist/lint/post-synth/gha057.d.ts.map +1 -0
- package/dist/lint/post-synth/gha058.d.ts +12 -0
- package/dist/lint/post-synth/gha058.d.ts.map +1 -0
- package/dist/lint/post-synth/index.d.ts +3 -0
- package/dist/lint/post-synth/index.d.ts.map +1 -0
- package/dist/lint/post-synth/yaml-helpers.d.ts +143 -0
- package/dist/lint/post-synth/yaml-helpers.d.ts.map +1 -0
- package/dist/lint/rules/data/deprecated-versions.d.ts +8 -0
- package/dist/lint/rules/data/deprecated-versions.d.ts.map +1 -0
- package/dist/lint/rules/data/flagged-actions.d.ts +19 -0
- package/dist/lint/rules/data/flagged-actions.d.ts.map +1 -0
- package/dist/lint/rules/data/known-action-slugs.d.ts +13 -0
- package/dist/lint/rules/data/known-action-slugs.d.ts.map +1 -0
- package/dist/lint/rules/data/known-actions.d.ts +8 -0
- package/dist/lint/rules/data/known-actions.d.ts.map +1 -0
- package/dist/lint/rules/data/preinstalled-tools.d.ts +11 -0
- package/dist/lint/rules/data/preinstalled-tools.d.ts.map +1 -0
- package/dist/lint/rules/data/recommended-inputs.d.ts +6 -0
- package/dist/lint/rules/data/recommended-inputs.d.ts.map +1 -0
- package/dist/lint/rules/data/risky-features.d.ts +18 -0
- package/dist/lint/rules/data/risky-features.d.ts.map +1 -0
- package/dist/lint/rules/data/secret-patterns.d.ts +8 -0
- package/dist/lint/rules/data/secret-patterns.d.ts.map +1 -0
- package/dist/lint/rules/data/trusted-action-owners.d.ts +13 -0
- package/dist/lint/rules/data/trusted-action-owners.d.ts.map +1 -0
- package/dist/lint/rules/data/untrusted-contexts.d.ts +19 -0
- package/dist/lint/rules/data/untrusted-contexts.d.ts.map +1 -0
- package/dist/lint/rules/deprecated-action-version.d.ts +8 -0
- package/dist/lint/rules/deprecated-action-version.d.ts.map +1 -0
- package/dist/lint/rules/detect-secrets.d.ts +9 -0
- package/dist/lint/rules/detect-secrets.d.ts.map +1 -0
- package/dist/lint/rules/extract-inline-structs.d.ts +8 -0
- package/dist/lint/rules/extract-inline-structs.d.ts.map +1 -0
- package/dist/lint/rules/file-job-limit.d.ts +8 -0
- package/dist/lint/rules/file-job-limit.d.ts.map +1 -0
- package/dist/lint/rules/index.d.ts +17 -0
- package/dist/lint/rules/index.d.ts.map +1 -0
- package/dist/lint/rules/job-timeout.d.ts +8 -0
- package/dist/lint/rules/job-timeout.d.ts.map +1 -0
- package/dist/lint/rules/missing-recommended-inputs.d.ts +8 -0
- package/dist/lint/rules/missing-recommended-inputs.d.ts.map +1 -0
- package/dist/lint/rules/no-hardcoded-secrets.d.ts +8 -0
- package/dist/lint/rules/no-hardcoded-secrets.d.ts.map +1 -0
- package/dist/lint/rules/no-raw-expressions.d.ts +8 -0
- package/dist/lint/rules/no-raw-expressions.d.ts.map +1 -0
- package/dist/lint/rules/suggest-cache.d.ts +8 -0
- package/dist/lint/rules/suggest-cache.d.ts.map +1 -0
- package/dist/lint/rules/use-condition-builders.d.ts +9 -0
- package/dist/lint/rules/use-condition-builders.d.ts.map +1 -0
- package/dist/lint/rules/use-matrix-builder.d.ts +9 -0
- package/dist/lint/rules/use-matrix-builder.d.ts.map +1 -0
- package/dist/lint/rules/use-typed-actions.d.ts +8 -0
- package/dist/lint/rules/use-typed-actions.d.ts.map +1 -0
- package/dist/lint/rules/validate-concurrency.d.ts +8 -0
- package/dist/lint/rules/validate-concurrency.d.ts.map +1 -0
- package/dist/lsp/completions.d.ts +6 -0
- package/dist/lsp/completions.d.ts.map +1 -0
- package/dist/lsp/hover.d.ts +6 -0
- package/dist/lsp/hover.d.ts.map +1 -0
- package/dist/manifest.json +1 -1
- package/dist/mcp/context-tools.d.ts +19 -0
- package/dist/mcp/context-tools.d.ts.map +1 -0
- package/dist/package-cli.d.ts +3 -0
- package/dist/package-cli.d.ts.map +1 -0
- package/dist/plugin.d.ts +9 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/serializer.d.ts +13 -0
- package/dist/serializer.d.ts.map +1 -0
- package/dist/spec/fetch.d.ts +26 -0
- package/dist/spec/fetch.d.ts.map +1 -0
- package/dist/validate-cli.d.ts +3 -0
- package/dist/validate-cli.d.ts.map +1 -0
- package/dist/validate.d.ts +12 -0
- package/dist/validate.d.ts.map +1 -0
- package/dist/variables.d.ts +42 -0
- package/dist/variables.d.ts.map +1 -0
- package/package.json +19 -5
- package/src/lint/post-synth/index.ts +95 -0
- package/src/mcp/context-tools.ts +2 -5
- package/src/plugin.ts +2 -3
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA033: Blanket `write-all` Token Permissions
|
|
3
|
+
*
|
|
4
|
+
* Flags a `permissions: write-all` grant at the workflow or job level. It hands
|
|
5
|
+
* the `GITHUB_TOKEN` every write scope regardless of what the job uses, so any
|
|
6
|
+
* compromised or injected step becomes a write-capable actor across the repo.
|
|
7
|
+
*/
|
|
8
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
9
|
+
export declare const gha033: PostSynthCheck;
|
|
10
|
+
//# sourceMappingURL=gha033.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha033.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha033.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,MAAM,EAAE,cAmCpB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA034: Workflow-Wide Write Scope (Prefer Job-Scoped Permissions)
|
|
3
|
+
*
|
|
4
|
+
* Flags individual write scopes granted at the workflow level. A workflow-wide
|
|
5
|
+
* grant gives every job that scope even when only one needs it. Least privilege
|
|
6
|
+
* prefers declaring the write scope on the single job that uses it.
|
|
7
|
+
*
|
|
8
|
+
* The `write-all` blanket preset is handled by GHA033 and skipped here.
|
|
9
|
+
*/
|
|
10
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
11
|
+
export declare const gha034: PostSynthCheck;
|
|
12
|
+
//# sourceMappingURL=gha034.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha034.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha034.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,MAAM,EAAE,cA2BpB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA035: Elevated Token Scope on an Untrusted-Code Trigger
|
|
3
|
+
*
|
|
4
|
+
* Raises the stakes of GHA033/GHA034: when a workflow can run untrusted code
|
|
5
|
+
* (`pull_request_target`, `workflow_run`) and also grants the token write
|
|
6
|
+
* access, an injected step runs with standing write credentials. This is the
|
|
7
|
+
* combination behind most CI privilege-escalation incidents, so it is an error.
|
|
8
|
+
*
|
|
9
|
+
* Cross-references the trust-boundary checks (GHA018 / GHA025 / GHA038).
|
|
10
|
+
*/
|
|
11
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
12
|
+
export declare const gha035: PostSynthCheck;
|
|
13
|
+
//# sourceMappingURL=gha035.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha035.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha035.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAgB9G,eAAO,MAAM,MAAM,EAAE,cAsCpB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA036: Untrusted Input Interpolated into a Shell Command
|
|
3
|
+
*
|
|
4
|
+
* Flags attacker-controllable expression contexts (PR titles, branch names,
|
|
5
|
+
* issue/comment bodies, commit messages) interpolated directly into a `run:`
|
|
6
|
+
* script. The value is expanded into the shell before the script runs, so a
|
|
7
|
+
* crafted payload becomes command execution. Pass untrusted input through an
|
|
8
|
+
* `env:` variable and reference it quoted instead.
|
|
9
|
+
*/
|
|
10
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
11
|
+
export declare const gha036: PostSynthCheck;
|
|
12
|
+
//# sourceMappingURL=gha036.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha036.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha036.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAI9G,eAAO,MAAM,MAAM,EAAE,cA2BpB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA037: Untrusted Input Written to GITHUB_ENV / GITHUB_PATH
|
|
3
|
+
*
|
|
4
|
+
* Flags a `run:` step that writes attacker-controllable input into the
|
|
5
|
+
* `$GITHUB_ENV` or `$GITHUB_PATH` files. Those files set environment variables
|
|
6
|
+
* and PATH entries for *later* steps, so injecting into them escalates a data
|
|
7
|
+
* value into influence over subsequent privileged steps (a known path to
|
|
8
|
+
* `LD_PRELOAD`/`NODE_OPTIONS`-style takeover).
|
|
9
|
+
*/
|
|
10
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
11
|
+
export declare const gha037: PostSynthCheck;
|
|
12
|
+
//# sourceMappingURL=gha037.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha037.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha037.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAM9G,eAAO,MAAM,MAAM,EAAE,cA6BpB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA038: Privileged `workflow_run` Trigger Checking Out Untrusted Code
|
|
3
|
+
*
|
|
4
|
+
* Generalizes GHA018 (pull_request_target + checkout) to the other privileged
|
|
5
|
+
* trigger that runs in the base-repo context: `workflow_run`. A `workflow_run`
|
|
6
|
+
* workflow has repo write scope and secrets, and checking out the artifact/head
|
|
7
|
+
* of the triggering run pulls untrusted code into that privileged context.
|
|
8
|
+
*/
|
|
9
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
10
|
+
export declare const gha038: PostSynthCheck;
|
|
11
|
+
//# sourceMappingURL=gha038.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha038.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha038.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,MAAM,EAAE,cA4BpB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA039: Spoofable Identity Used as an Authorization Gate
|
|
3
|
+
*
|
|
4
|
+
* Flags an `if:` condition that gates execution on a commit-author identity
|
|
5
|
+
* field (`...author.name` / `...author.email`). Those values come straight from
|
|
6
|
+
* git metadata the committer sets freely, so an attacker can forge them to pass
|
|
7
|
+
* the gate. Use a trustworthy signal — environment protection rules, CODEOWNERS,
|
|
8
|
+
* or membership checks against a verified actor.
|
|
9
|
+
*/
|
|
10
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
11
|
+
export declare const gha039: PostSynthCheck;
|
|
12
|
+
//# sourceMappingURL=gha039.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha039.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha039.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAM9G,eAAO,MAAM,MAAM,EAAE,cAwBpB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA040: Self-Hosted Runner on a Trigger That Can Run Untrusted Code
|
|
3
|
+
*
|
|
4
|
+
* Flags a job that runs on a self-hosted runner under a trigger reachable by a
|
|
5
|
+
* fork or outside contributor (`pull_request`, `pull_request_target`,
|
|
6
|
+
* `workflow_run`). Self-hosted runners are non-ephemeral by default and share a
|
|
7
|
+
* host, so untrusted code can persist on the runner and compromise later jobs.
|
|
8
|
+
*/
|
|
9
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
10
|
+
export declare const gha040: PostSynthCheck;
|
|
11
|
+
//# sourceMappingURL=gha040.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha040.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha040.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAK9G,eAAO,MAAM,MAAM,EAAE,cA4BpB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA041: Blanket `secrets: inherit` into a Reusable Workflow
|
|
3
|
+
*
|
|
4
|
+
* Flags a reusable-workflow call that passes `secrets: inherit`. Inheritance
|
|
5
|
+
* hands the called workflow every secret the caller can see, regardless of what
|
|
6
|
+
* it needs. Pass through only the specific secrets the reusable workflow uses.
|
|
7
|
+
*/
|
|
8
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
9
|
+
export declare const gha041: PostSynthCheck;
|
|
10
|
+
//# sourceMappingURL=gha041.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha041.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha041.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,MAAM,EAAE,cA0BpB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA042: Whole Secrets Context Passed Where Specific Secrets Would Do
|
|
3
|
+
*
|
|
4
|
+
* Flags `toJSON(secrets)` (serializing the entire secrets context) passed into
|
|
5
|
+
* a step's `with:`/`env:` or to a reusable workflow. It hands the consumer every
|
|
6
|
+
* secret instead of the one or two it needs. Reference specific secrets.
|
|
7
|
+
*/
|
|
8
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
9
|
+
export declare const gha042: PostSynthCheck;
|
|
10
|
+
//# sourceMappingURL=gha042.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha042.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha042.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAK9G,eAAO,MAAM,MAAM,EAAE,cA0BpB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA043: Secret Consumed in a Job Without an Environment Gate
|
|
3
|
+
*
|
|
4
|
+
* Extends GHA026 (which fires only when a workflow uses secrets and defines no
|
|
5
|
+
* environment at all). When a workflow *does* gate some jobs with an
|
|
6
|
+
* `environment:`, this flags the specific jobs that consume secrets without one
|
|
7
|
+
* — the inconsistent-gating case, where a secret-using job skips the approval
|
|
8
|
+
* and scoping the author applied elsewhere.
|
|
9
|
+
*/
|
|
10
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
11
|
+
export declare const gha043: PostSynthCheck;
|
|
12
|
+
//# sourceMappingURL=gha043.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha043.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha043.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,MAAM,EAAE,cA2BpB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA044: Hardcoded Registry / Container Credential
|
|
3
|
+
*
|
|
4
|
+
* Flags a `password:` / `token:` / `registry-password:` value that is a literal
|
|
5
|
+
* rather than a `${{ secrets.* }}` reference — e.g. a registry login or service
|
|
6
|
+
* credential inlined in plain text. Move it into a secret.
|
|
7
|
+
*/
|
|
8
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
9
|
+
export declare const gha044: PostSynthCheck;
|
|
10
|
+
//# sourceMappingURL=gha044.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha044.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha044.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAK9G,eAAO,MAAM,MAAM,EAAE,cA2BpB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA045: Secret Interpolated Directly into a Shell Command
|
|
3
|
+
*
|
|
4
|
+
* Flags `${{ secrets.* }}` expanded straight into a `run:` script. The value is
|
|
5
|
+
* substituted into the command line before the shell runs, where a transform
|
|
6
|
+
* (base64, reversing, splitting) can defeat GitHub's log masking and leak it,
|
|
7
|
+
* and the raw value is exposed to argument-injection. Pass secrets through an
|
|
8
|
+
* `env:` variable and reference "$VAR" quoted instead.
|
|
9
|
+
*/
|
|
10
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
11
|
+
export declare const gha045: PostSynthCheck;
|
|
12
|
+
//# sourceMappingURL=gha045.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha045.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha045.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,MAAM,EAAE,cAwBpB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA046: Logically Unsound Guard Condition
|
|
3
|
+
*
|
|
4
|
+
* Flags an `if:` condition that reads like a security/flow gate but evaluates to
|
|
5
|
+
* a constant — `true`/`false` literals, an `X == X` tautology, or an expression
|
|
6
|
+
* that collapses via `|| true` / `&& false`. These pass review by looking like a
|
|
7
|
+
* control while gating nothing (or everything).
|
|
8
|
+
*/
|
|
9
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
10
|
+
/** Classify a condition as a constant guard, returning a reason or undefined. */
|
|
11
|
+
export declare function unsoundReason(expr: string): string | undefined;
|
|
12
|
+
export declare const gha046: PostSynthCheck;
|
|
13
|
+
//# sourceMappingURL=gha046.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha046.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha046.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAQ9G,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAW9D;AAED,eAAO,MAAM,MAAM,EAAE,cAwBpB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA047: Ineffective `contains()` Guard (Reversed Arguments)
|
|
3
|
+
*
|
|
4
|
+
* Flags `contains('literal', <dynamic>)` — a string literal as the haystack and
|
|
5
|
+
* a dynamic value as the needle. `contains(search, item)` checks whether `item`
|
|
6
|
+
* is in `search`, so a constant first argument makes the result depend on a
|
|
7
|
+
* fixed string rather than the runtime value the author intended to test. The
|
|
8
|
+
* usual fix is to swap the arguments.
|
|
9
|
+
*/
|
|
10
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
11
|
+
export declare const gha047: PostSynthCheck;
|
|
12
|
+
//# sourceMappingURL=gha047.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha047.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha047.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAW9G,eAAO,MAAM,MAAM,EAAE,cA6BpB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA048: Obfuscated Guard Condition
|
|
3
|
+
*
|
|
4
|
+
* Flags an `if:` condition that builds its compared value through string
|
|
5
|
+
* indirection — `format()`, `join()`, or `fromJSON()` feeding a comparison.
|
|
6
|
+
* Constructing the operand at evaluation time hides what the gate actually
|
|
7
|
+
* checks, which is how an unsound condition (GHA046/GHA047) is disguised to pass
|
|
8
|
+
* review. Write the comparison against the value directly.
|
|
9
|
+
*/
|
|
10
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
11
|
+
export declare const gha048: PostSynthCheck;
|
|
12
|
+
//# sourceMappingURL=gha048.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha048.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha048.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAM9G,eAAO,MAAM,MAAM,EAAE,cAwBpB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA049: Persisted Checkout Credentials Reachable by an Uploaded Artifact
|
|
3
|
+
*
|
|
4
|
+
* `actions/checkout` writes the job token into `.git/config` by default
|
|
5
|
+
* (`persist-credentials: true`). A job that also uploads an artifact can sweep
|
|
6
|
+
* that `.git` directory into the artifact, leaking the token to anyone who can
|
|
7
|
+
* download it. Set `persist-credentials: false` on the checkout when the job
|
|
8
|
+
* uploads artifacts.
|
|
9
|
+
*/
|
|
10
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
11
|
+
export declare const gha049: PostSynthCheck;
|
|
12
|
+
//# sourceMappingURL=gha049.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha049.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha049.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,MAAM,EAAE,cA4BpB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA050: Cache Populated in a Privileged Context (Poisoning Risk)
|
|
3
|
+
*
|
|
4
|
+
* Flags `actions/cache` use under a privileged trigger (`pull_request_target`,
|
|
5
|
+
* `workflow_run`) that runs in the base-repo context. Cache entries written from
|
|
6
|
+
* code influenced by a fork can later be restored by a trusted run and executed,
|
|
7
|
+
* a cache-poisoning path. Restrict caching to trusted triggers or scope keys so
|
|
8
|
+
* untrusted runs cannot write entries a privileged run will restore.
|
|
9
|
+
*/
|
|
10
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
11
|
+
export declare const gha050: PostSynthCheck;
|
|
12
|
+
//# sourceMappingURL=gha050.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha050.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha050.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAK9G,eAAO,MAAM,MAAM,EAAE,cA4BpB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA051: Publish/Release Step Using a Long-Lived Token Instead of OIDC
|
|
3
|
+
*
|
|
4
|
+
* Flags a job that publishes a release/package using a long-lived token secret
|
|
5
|
+
* (`*_TOKEN`, `*_PASSWORD`, `*_API_KEY`) while the workflow requests no
|
|
6
|
+
* `id-token: write` permission. Registries that support OIDC let a workflow mint
|
|
7
|
+
* a short-lived, audience-scoped credential per run instead of holding a
|
|
8
|
+
* standing secret. Advisory — not every registry supports OIDC.
|
|
9
|
+
*/
|
|
10
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
11
|
+
export declare const gha051: PostSynthCheck;
|
|
12
|
+
//# sourceMappingURL=gha051.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha051.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha051.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAM9G,eAAO,MAAM,MAAM,EAAE,cA4BpB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA052: Software Fetched and Executed at Runtime Without Verification
|
|
3
|
+
*
|
|
4
|
+
* Flags a `run:` step that pipes a network download straight into a shell
|
|
5
|
+
* (`curl ... | bash`, `wget ... | sh`, `iwr ... | iex`). The fetched script is
|
|
6
|
+
* unpinned and unverified, so whoever controls the URL controls what executes
|
|
7
|
+
* in the job. Download to a file, verify a checksum/signature, then run it.
|
|
8
|
+
*/
|
|
9
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
10
|
+
export declare const gha052: PostSynthCheck;
|
|
11
|
+
//# sourceMappingURL=gha052.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha052.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha052.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAQ9G,eAAO,MAAM,MAAM,EAAE,cAwBpB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA053: Re-enabling Unsafe Workflow-Command Processing
|
|
3
|
+
*
|
|
4
|
+
* Flags opt-ins that reintroduce the `set-env` / `add-path` workflow commands
|
|
5
|
+
* removed for security (CVE-2020-15228) — `ACTIONS_ALLOW_UNSECURE_COMMANDS` and
|
|
6
|
+
* direct `::set-env::` / `::add-path::` emission. These let a logged string set
|
|
7
|
+
* arbitrary environment/PATH state for later steps, a code-execution path.
|
|
8
|
+
*/
|
|
9
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
10
|
+
export declare const gha053: PostSynthCheck;
|
|
11
|
+
//# sourceMappingURL=gha053.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha053.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha053.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAK9G,eAAO,MAAM,MAAM,EAAE,cA0BpB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA054: Use of a Feature with a Known Security Footgun
|
|
3
|
+
*
|
|
4
|
+
* Catch-all, data-driven check: flags emitted workflow content matching a
|
|
5
|
+
* vendored snapshot of known-risky GitHub Actions features (deprecated workflow
|
|
6
|
+
* commands, unsafe runtime opt-ins, masking footguns). Advisory; the dataset is
|
|
7
|
+
* necessarily incomplete.
|
|
8
|
+
*/
|
|
9
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
10
|
+
export declare const gha054: PostSynthCheck;
|
|
11
|
+
//# sourceMappingURL=gha054.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha054.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha054.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAI9G,eAAO,MAAM,MAAM,EAAE,cA2BpB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA055: Runtime Install of a Tool Already on the Runner
|
|
3
|
+
*
|
|
4
|
+
* Flags a `run:` step that installs (apt/brew/apk/choco) a tool that GitHub-
|
|
5
|
+
* hosted runners already ship. The redundant install adds a third-party
|
|
6
|
+
* download and supply-chain surface for no benefit and slows the job. Advisory;
|
|
7
|
+
* irrelevant on self-hosted runners that may lack the tool.
|
|
8
|
+
*/
|
|
9
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
10
|
+
export declare const gha055: PostSynthCheck;
|
|
11
|
+
//# sourceMappingURL=gha055.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha055.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha055.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAM9G,eAAO,MAAM,MAAM,EAAE,cAkCpB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA056: Workflow Without a `name:`
|
|
3
|
+
*
|
|
4
|
+
* Flags an emitted workflow with no top-level `name:`. Without one, GitHub falls
|
|
5
|
+
* back to the file path in the Actions UI and audit logs, making runs harder to
|
|
6
|
+
* identify and review. A clear name improves observability and audit output.
|
|
7
|
+
*/
|
|
8
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
9
|
+
export declare const gha056: PostSynthCheck;
|
|
10
|
+
//# sourceMappingURL=gha056.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha056.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha056.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,MAAM,EAAE,cAyBpB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA057: Dependency Update Executing Untrusted External Code
|
|
3
|
+
*
|
|
4
|
+
* Flags a dependabot `updates:` entry with
|
|
5
|
+
* `insecure-external-code-execution: allow`. That setting lets a freshly-pulled
|
|
6
|
+
* dependency run lifecycle scripts (e.g. npm `postinstall`) during the update
|
|
7
|
+
* itself — a compromised release executes in the update job before any review.
|
|
8
|
+
* Set it to `deny`, or isolate the ecosystem.
|
|
9
|
+
*/
|
|
10
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
11
|
+
export declare const gha057: PostSynthCheck;
|
|
12
|
+
//# sourceMappingURL=gha057.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha057.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha057.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,MAAM,EAAE,cA0BpB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHA058: Dependency Update Without a Cooldown
|
|
3
|
+
*
|
|
4
|
+
* Flags a dependabot `updates:` entry with no cooldown (or an all-zero one). A
|
|
5
|
+
* version published seconds ago — including a compromised one — is adopted
|
|
6
|
+
* immediately, with no window for the ecosystem to yank it or for anyone to
|
|
7
|
+
* react. Configure a `cooldown:` so freshly-published versions wait before they
|
|
8
|
+
* are proposed.
|
|
9
|
+
*/
|
|
10
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
11
|
+
export declare const gha058: PostSynthCheck;
|
|
12
|
+
//# sourceMappingURL=gha058.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gha058.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/gha058.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAW9G,eAAO,MAAM,MAAM,EAAE,cA0BpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AA+CvE,eAAO,MAAM,eAAe,EAAE,cAAc,EA8C3C,CAAC"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helpers for parsing serialized GitHub Actions YAML in post-synth checks.
|
|
3
|
+
*/
|
|
4
|
+
import type { SerializerResult } from "@intentius/chant/serializer";
|
|
5
|
+
export { getPrimaryOutput } from "@intentius/chant/lint/post-synth";
|
|
6
|
+
/**
|
|
7
|
+
* Return the emitted `.github/dependabot.yml` content from a serializer output,
|
|
8
|
+
* if present (it rides as an additional file alongside the workflow output).
|
|
9
|
+
*/
|
|
10
|
+
export declare function getDependabotYaml(output: string | SerializerResult): string | undefined;
|
|
11
|
+
/** Parse the `updates:` array from a dependabot.yml document. */
|
|
12
|
+
export declare function extractDependabotUpdates(dependabotYaml: string): Array<Record<string, unknown>>;
|
|
13
|
+
export interface ParsedJob {
|
|
14
|
+
name: string;
|
|
15
|
+
needs?: string[];
|
|
16
|
+
steps?: Array<{
|
|
17
|
+
uses?: string;
|
|
18
|
+
run?: string;
|
|
19
|
+
name?: string;
|
|
20
|
+
}>;
|
|
21
|
+
permissions?: Record<string, string>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Extract jobs from a serialized GitHub Actions workflow YAML.
|
|
25
|
+
*/
|
|
26
|
+
export declare function extractJobs(yaml: string): Map<string, ParsedJob>;
|
|
27
|
+
/**
|
|
28
|
+
* Extract trigger events from the YAML.
|
|
29
|
+
*/
|
|
30
|
+
export declare function extractTriggers(yaml: string): Record<string, unknown>;
|
|
31
|
+
/**
|
|
32
|
+
* Check if any step in the list uses a checkout action.
|
|
33
|
+
*/
|
|
34
|
+
export declare function hasCheckoutAction(steps: Array<{
|
|
35
|
+
uses?: string;
|
|
36
|
+
}>): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Build a needs dependency graph from the YAML.
|
|
39
|
+
*/
|
|
40
|
+
export declare function buildNeedsGraph(yaml: string): Map<string, string[]>;
|
|
41
|
+
/**
|
|
42
|
+
* Extract the workflow name from the YAML.
|
|
43
|
+
*/
|
|
44
|
+
export declare function extractWorkflowName(yaml: string): string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Check if the YAML has an explicit permissions block.
|
|
47
|
+
*/
|
|
48
|
+
export declare function hasPermissions(yaml: string): boolean;
|
|
49
|
+
/** A single `uses:` reference found in a workflow. */
|
|
50
|
+
export interface ActionRef {
|
|
51
|
+
/** Owning job name. */
|
|
52
|
+
job: string;
|
|
53
|
+
/** The raw `uses:` value (e.g. `actions/setup-node@v4`). */
|
|
54
|
+
ref: string;
|
|
55
|
+
/** Whether it is a step-level action or a job-level reusable workflow. */
|
|
56
|
+
level: "step" | "job";
|
|
57
|
+
}
|
|
58
|
+
/** A container/service/docker image reference found in a workflow. */
|
|
59
|
+
export interface ImageRef {
|
|
60
|
+
/** Owning job name. */
|
|
61
|
+
job: string;
|
|
62
|
+
/** The raw image reference (e.g. `node:20`). */
|
|
63
|
+
image: string;
|
|
64
|
+
/** Where the image was declared. */
|
|
65
|
+
source: "container" | "service" | "step";
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Extract every `uses:` reference from the workflow — both step-level actions
|
|
69
|
+
* and job-level reusable-workflow calls. Uses the structural YAML parser so
|
|
70
|
+
* nested jobs/steps are handled reliably.
|
|
71
|
+
*/
|
|
72
|
+
export declare function extractActionRefs(yaml: string): ActionRef[];
|
|
73
|
+
/**
|
|
74
|
+
* Extract every container/service/`docker://` image reference from the workflow.
|
|
75
|
+
*/
|
|
76
|
+
export declare function extractImageRefs(yaml: string): ImageRef[];
|
|
77
|
+
/** A `run:` script block with its owning job. */
|
|
78
|
+
export interface RunBlock {
|
|
79
|
+
job: string;
|
|
80
|
+
run: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Extract every `run:` script (inline and `|`/`>` block scalars) with its
|
|
84
|
+
* owning job.
|
|
85
|
+
*/
|
|
86
|
+
export declare function extractRunBlocks(yaml: string): RunBlock[];
|
|
87
|
+
/** An `if:` condition with its owning job. */
|
|
88
|
+
export interface IfCondition {
|
|
89
|
+
job: string;
|
|
90
|
+
expr: string;
|
|
91
|
+
}
|
|
92
|
+
/** Extract every `if:` condition (job-level and step-level) with its job. */
|
|
93
|
+
export declare function extractIfConditions(yaml: string): IfCondition[];
|
|
94
|
+
/** Extract each job's `runs-on:` value(s) as a flat list of labels. */
|
|
95
|
+
export declare function extractRunsOnByJob(yaml: string): Map<string, string[]>;
|
|
96
|
+
/** Pull every `${{ ... }}` expression body out of a string. */
|
|
97
|
+
export declare function extractExpressions(text: string): string[];
|
|
98
|
+
/** Every line inside the `jobs:` block paired with its owning job name. */
|
|
99
|
+
export declare function jobLines(yaml: string): Array<{
|
|
100
|
+
job: string;
|
|
101
|
+
line: string;
|
|
102
|
+
}>;
|
|
103
|
+
/** All lines inside the `jobs:` block grouped by owning job. */
|
|
104
|
+
export declare function linesByJob(yaml: string): Map<string, string[]>;
|
|
105
|
+
/** Set of jobs that declare an `environment:`. */
|
|
106
|
+
export declare function extractJobEnvironments(yaml: string): Set<string>;
|
|
107
|
+
/** Set of jobs whose body references a `secrets.` context. */
|
|
108
|
+
export declare function jobsReferencingSecrets(yaml: string): Set<string>;
|
|
109
|
+
/** A permissions value as it appears in YAML: a string preset or a scope map. */
|
|
110
|
+
export type PermissionsValue = string | Record<string, string>;
|
|
111
|
+
/** The workflow-level `permissions:` value, if present. */
|
|
112
|
+
export declare function extractWorkflowPermissions(yaml: string): PermissionsValue | undefined;
|
|
113
|
+
/** Per-job `permissions:` values, keyed by job name. Only jobs that declare one. */
|
|
114
|
+
export declare function extractJobPermissions(yaml: string): Map<string, PermissionsValue>;
|
|
115
|
+
/**
|
|
116
|
+
* Classify a permissions value's write surface.
|
|
117
|
+
* `writeAll` is the `write-all` blanket preset; `scopes` lists the individual
|
|
118
|
+
* scopes granted `write` in map form.
|
|
119
|
+
*/
|
|
120
|
+
export declare function writeSurface(perms: PermissionsValue): {
|
|
121
|
+
writeAll: boolean;
|
|
122
|
+
scopes: string[];
|
|
123
|
+
};
|
|
124
|
+
/** True if the permissions value grants any write access (blanket or scoped). */
|
|
125
|
+
export declare function grantsWrite(perms: PermissionsValue): boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Split an action `uses:` value into its `owner/repo` slug and git ref.
|
|
128
|
+
* Returns undefined for local (`./`, `../`) and `docker://` references, which
|
|
129
|
+
* are not GitHub action repository references.
|
|
130
|
+
*/
|
|
131
|
+
/**
|
|
132
|
+
* Strip a trailing inline YAML comment from a `uses:` value. A `uses` ref
|
|
133
|
+
* cannot contain whitespace, so `<ref> # v1.2.3` (the recommended SHA-pin
|
|
134
|
+
* style) is safe to trim back to `<ref>`.
|
|
135
|
+
*/
|
|
136
|
+
export declare function stripUsesComment(uses: string): string;
|
|
137
|
+
export declare function parseActionUses(rawUses: string): {
|
|
138
|
+
owner: string;
|
|
139
|
+
repo: string;
|
|
140
|
+
slug: string;
|
|
141
|
+
gitRef: string;
|
|
142
|
+
} | undefined;
|
|
143
|
+
//# sourceMappingURL=yaml-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yaml-helpers.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/yaml-helpers.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecated-versions.d.ts","sourceRoot":"","sources":["../../../../src/lint/rules/data/deprecated-versions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAQ5F,CAAC"}
|