@intentius/chant-lexicon-gitlab 0.7.0 → 0.8.1
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 +12 -0
- package/dist/codegen/docs.d.ts.map +1 -0
- package/dist/codegen/fetch.d.ts +40 -0
- package/dist/codegen/fetch.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 +19 -0
- package/dist/codegen/generate.d.ts.map +1 -0
- package/dist/codegen/naming.d.ts +15 -0
- package/dist/codegen/naming.d.ts.map +1 -0
- package/dist/codegen/package.d.ts +11 -0
- package/dist/codegen/package.d.ts.map +1 -0
- package/dist/codegen/parse.d.ts +60 -0
- package/dist/codegen/parse.d.ts.map +1 -0
- package/dist/codegen/patches.d.ts +31 -0
- package/dist/codegen/patches.d.ts.map +1 -0
- package/dist/codegen/typecheck.d.ts +5 -0
- package/dist/codegen/typecheck.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/index.d.ts +11 -0
- package/dist/composites/index.d.ts.map +1 -0
- package/dist/composites/mr-plan-report.d.ts +43 -0
- package/dist/composites/mr-plan-report.d.ts.map +1 -0
- package/dist/composites/node-pipeline.d.ts +55 -0
- package/dist/composites/node-pipeline.d.ts.map +1 -0
- package/dist/composites/python-pipeline.d.ts +21 -0
- package/dist/composites/python-pipeline.d.ts.map +1 -0
- package/dist/composites/review-app.d.ts +24 -0
- package/dist/composites/review-app.d.ts.map +1 -0
- package/dist/coverage.d.ts +18 -0
- package/dist/coverage.d.ts.map +1 -0
- package/dist/generated/index.d.ts +22 -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 +14 -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 +12 -12
- package/dist/intrinsics.d.ts +30 -0
- package/dist/intrinsics.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/wgl010.d.ts +9 -0
- package/dist/lint/post-synth/wgl010.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl011.d.ts +13 -0
- package/dist/lint/post-synth/wgl011.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl012.d.ts +13 -0
- package/dist/lint/post-synth/wgl012.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl013.d.ts +16 -0
- package/dist/lint/post-synth/wgl013.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl014.d.ts +13 -0
- package/dist/lint/post-synth/wgl014.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl015.d.ts +12 -0
- package/dist/lint/post-synth/wgl015.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl016.d.ts +10 -0
- package/dist/lint/post-synth/wgl016.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl017.d.ts +10 -0
- package/dist/lint/post-synth/wgl017.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl018.d.ts +9 -0
- package/dist/lint/post-synth/wgl018.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl019.d.ts +9 -0
- package/dist/lint/post-synth/wgl019.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl020.d.ts +11 -0
- package/dist/lint/post-synth/wgl020.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl021.d.ts +10 -0
- package/dist/lint/post-synth/wgl021.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl022.d.ts +10 -0
- package/dist/lint/post-synth/wgl022.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl023.d.ts +10 -0
- package/dist/lint/post-synth/wgl023.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl024.d.ts +10 -0
- package/dist/lint/post-synth/wgl024.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl025.d.ts +10 -0
- package/dist/lint/post-synth/wgl025.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl026.d.ts +10 -0
- package/dist/lint/post-synth/wgl026.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl027.d.ts +9 -0
- package/dist/lint/post-synth/wgl027.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl028.d.ts +11 -0
- package/dist/lint/post-synth/wgl028.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl029.d.ts +11 -0
- package/dist/lint/post-synth/wgl029.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl030.d.ts +11 -0
- package/dist/lint/post-synth/wgl030.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl031.d.ts +11 -0
- package/dist/lint/post-synth/wgl031.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl032.d.ts +12 -0
- package/dist/lint/post-synth/wgl032.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl033.d.ts +11 -0
- package/dist/lint/post-synth/wgl033.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl034.d.ts +12 -0
- package/dist/lint/post-synth/wgl034.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl035.d.ts +12 -0
- package/dist/lint/post-synth/wgl035.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl036.d.ts +14 -0
- package/dist/lint/post-synth/wgl036.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl037.d.ts +12 -0
- package/dist/lint/post-synth/wgl037.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl038.d.ts +14 -0
- package/dist/lint/post-synth/wgl038.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl039.d.ts +11 -0
- package/dist/lint/post-synth/wgl039.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl040.d.ts +11 -0
- package/dist/lint/post-synth/wgl040.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl041.d.ts +13 -0
- package/dist/lint/post-synth/wgl041.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl042.d.ts +12 -0
- package/dist/lint/post-synth/wgl042.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl043.d.ts +12 -0
- package/dist/lint/post-synth/wgl043.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl044.d.ts +11 -0
- package/dist/lint/post-synth/wgl044.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl045.d.ts +12 -0
- package/dist/lint/post-synth/wgl045.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl046.d.ts +12 -0
- package/dist/lint/post-synth/wgl046.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl047.d.ts +11 -0
- package/dist/lint/post-synth/wgl047.d.ts.map +1 -0
- package/dist/lint/post-synth/wgl048.d.ts +11 -0
- package/dist/lint/post-synth/wgl048.d.ts.map +1 -0
- package/dist/lint/post-synth/yaml-helpers.d.ts +107 -0
- package/dist/lint/post-synth/yaml-helpers.d.ts.map +1 -0
- package/dist/lint/rules/artifact-no-expiry.d.ts +9 -0
- package/dist/lint/rules/artifact-no-expiry.d.ts.map +1 -0
- package/dist/lint/rules/data/known-include-sources.d.ts +14 -0
- package/dist/lint/rules/data/known-include-sources.d.ts.map +1 -0
- package/dist/lint/rules/data/untrusted-variables.d.ts +14 -0
- package/dist/lint/rules/data/untrusted-variables.d.ts.map +1 -0
- package/dist/lint/rules/deprecated-only-except.d.ts +10 -0
- package/dist/lint/rules/deprecated-only-except.d.ts.map +1 -0
- package/dist/lint/rules/index.d.ts +8 -0
- package/dist/lint/rules/index.d.ts.map +1 -0
- package/dist/lint/rules/missing-script.d.ts +9 -0
- package/dist/lint/rules/missing-script.d.ts.map +1 -0
- package/dist/lint/rules/missing-stage.d.ts +9 -0
- package/dist/lint/rules/missing-stage.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 +20 -0
- package/dist/mcp/context-tools.d.ts.map +1 -0
- package/dist/migrate/from-github/actions/index.d.ts +13 -0
- package/dist/migrate/from-github/actions/index.d.ts.map +1 -0
- package/dist/migrate/from-github/actions/registry.d.ts +63 -0
- package/dist/migrate/from-github/actions/registry.d.ts.map +1 -0
- package/dist/migrate/from-github/actions/tier-1.d.ts +20 -0
- package/dist/migrate/from-github/actions/tier-1.d.ts.map +1 -0
- package/dist/migrate/from-github/actions/tier-2.d.ts +9 -0
- package/dist/migrate/from-github/actions/tier-2.d.ts.map +1 -0
- package/dist/migrate/from-github/actions/tier-3.d.ts +9 -0
- package/dist/migrate/from-github/actions/tier-3.d.ts.map +1 -0
- package/dist/migrate/from-github/composites/patterns.d.ts +27 -0
- package/dist/migrate/from-github/composites/patterns.d.ts.map +1 -0
- package/dist/migrate/from-github/composites/rewriter.d.ts +14 -0
- package/dist/migrate/from-github/composites/rewriter.d.ts.map +1 -0
- package/dist/migrate/from-github/diagnostics.d.ts +17 -0
- package/dist/migrate/from-github/diagnostics.d.ts.map +1 -0
- package/dist/migrate/from-github/emit-yaml.d.ts +16 -0
- package/dist/migrate/from-github/emit-yaml.d.ts.map +1 -0
- package/dist/migrate/from-github/expressions.d.ts +65 -0
- package/dist/migrate/from-github/expressions.d.ts.map +1 -0
- package/dist/migrate/from-github/index.d.ts +61 -0
- package/dist/migrate/from-github/index.d.ts.map +1 -0
- package/dist/migrate/from-github/provenance.d.ts +68 -0
- package/dist/migrate/from-github/provenance.d.ts.map +1 -0
- package/dist/migrate/from-github/rules.d.ts +12 -0
- package/dist/migrate/from-github/rules.d.ts.map +1 -0
- package/dist/migrate/from-github/security.d.ts +35 -0
- package/dist/migrate/from-github/security.d.ts.map +1 -0
- package/dist/migrate/from-github/stages.d.ts +34 -0
- package/dist/migrate/from-github/stages.d.ts.map +1 -0
- package/dist/migrate/from-github/transformer.d.ts +26 -0
- package/dist/migrate/from-github/transformer.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/rules/wgl011.ts +2 -2
- package/dist/rules/wgl012.ts +2 -2
- package/dist/rules/wgl018.ts +2 -2
- package/dist/rules/wgl019.ts +2 -2
- package/dist/rules/wgl022.ts +2 -2
- package/dist/rules/wgl023.ts +2 -2
- package/dist/rules/wgl024.ts +2 -2
- package/dist/rules/wgl025.ts +2 -2
- package/dist/rules/wgl026.ts +2 -2
- package/dist/rules/wgl027.ts +2 -2
- package/dist/serializer.d.ts +14 -0
- package/dist/serializer.d.ts.map +1 -0
- package/dist/testdata/create-fixture.d.ts +7 -0
- package/dist/testdata/create-fixture.d.ts.map +1 -0
- package/dist/testdata/load-fixtures.d.ts +12 -0
- package/dist/testdata/load-fixtures.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 +17 -0
- package/dist/validate.d.ts.map +1 -0
- package/dist/variables.d.ts +31 -0
- package/dist/variables.d.ts.map +1 -0
- package/package.json +20 -6
- package/src/codegen/parse.ts +2 -2
- package/src/lint/post-synth/index.ts +83 -0
- package/src/lint/post-synth/wgl011.ts +2 -2
- package/src/lint/post-synth/wgl012.ts +2 -2
- package/src/lint/post-synth/wgl018.ts +2 -2
- package/src/lint/post-synth/wgl019.ts +2 -2
- package/src/lint/post-synth/wgl022.ts +2 -2
- package/src/lint/post-synth/wgl023.ts +2 -2
- package/src/lint/post-synth/wgl024.ts +2 -2
- package/src/lint/post-synth/wgl025.ts +2 -2
- package/src/lint/post-synth/wgl026.ts +2 -2
- package/src/lint/post-synth/wgl027.ts +2 -2
- package/src/mcp/context-tools.ts +3 -5
- package/src/plugin.ts +2 -3
- package/src/serializer.ts +5 -5
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGL039: Secret Echoed to Job Logs
|
|
3
|
+
*
|
|
4
|
+
* Flags a `script:` command that prints a secret-like variable (`echo`,
|
|
5
|
+
* `printf`, `print`, `cat`) — even masked variables leak when transformed
|
|
6
|
+
* (base64, reversed) before printing, and job logs are broadly readable.
|
|
7
|
+
* Remove the debug print or pipe the value where it is needed without echoing it.
|
|
8
|
+
*/
|
|
9
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
10
|
+
export declare const wgl039: PostSynthCheck;
|
|
11
|
+
//# sourceMappingURL=wgl039.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wgl039.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wgl039.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
|
+
* WGL040: Hardcoded Credential in a Registry Login
|
|
3
|
+
*
|
|
4
|
+
* Flags a `docker login` (or compatible) in a `script:` that passes a literal
|
|
5
|
+
* password via `-p` / `--password` instead of a variable or `--password-stdin`.
|
|
6
|
+
* An inlined credential sits in the committed pipeline and the job log. Use a
|
|
7
|
+
* masked CI/CD variable and `--password-stdin`. Extends WGL016 to scripts.
|
|
8
|
+
*/
|
|
9
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
10
|
+
export declare const wgl040: PostSynthCheck;
|
|
11
|
+
//# sourceMappingURL=wgl040.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wgl040.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wgl040.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAM9G,eAAO,MAAM,MAAM,EAAE,cA0BpB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGL041: Logically Unsound rules:if Condition
|
|
3
|
+
*
|
|
4
|
+
* Flags a `rules:if` that reads like a gate but is a constant — both sides of an
|
|
5
|
+
* `==`/`!=` are identical, so the condition is always true or always false.
|
|
6
|
+
* Generalizes WGL011 (rules that always evaluate to never) to tautological
|
|
7
|
+
* conditions presented as gates.
|
|
8
|
+
*/
|
|
9
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
10
|
+
/** Classify an `if:` expression as a tautology, returning a reason or undefined. */
|
|
11
|
+
export declare function tautologyReason(expr: string): string | undefined;
|
|
12
|
+
export declare const wgl041: PostSynthCheck;
|
|
13
|
+
//# sourceMappingURL=wgl041.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wgl041.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wgl041.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAO9G,oFAAoF;AACpF,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAOhE;AAED,eAAO,MAAM,MAAM,EAAE,cA8BpB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGL042: Unreachable rules After an Unconditional Match
|
|
3
|
+
*
|
|
4
|
+
* GitLab evaluates `rules:` top-down and the first match wins. A rule with no
|
|
5
|
+
* `if:` (and not `when: never`) matches every pipeline, so any rule listed after
|
|
6
|
+
* it is dead — it can never be reached. Such dead rules usually mean the gate
|
|
7
|
+
* the author intended is not actually applied. Reorder so specific rules precede
|
|
8
|
+
* the catch-all.
|
|
9
|
+
*/
|
|
10
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
11
|
+
export declare const wgl042: PostSynthCheck;
|
|
12
|
+
//# sourceMappingURL=wgl042.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wgl042.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wgl042.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,MAAM,EAAE,cAgCpB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGL043: Match-Anything Regex Gate
|
|
3
|
+
*
|
|
4
|
+
* Flags a `rules:if` whose regex match (`=~`) uses a pattern that matches every
|
|
5
|
+
* value — an empty regex, dot-star, or an anchored dot-star. The condition reads
|
|
6
|
+
* like a filter on a ref or variable but admits everything, so it gates nothing.
|
|
7
|
+
* This is how an unsound condition is obscured behind a regex. Tighten the
|
|
8
|
+
* pattern or remove the gate.
|
|
9
|
+
*/
|
|
10
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
11
|
+
export declare const wgl043: PostSynthCheck;
|
|
12
|
+
//# sourceMappingURL=wgl043.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wgl043.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wgl043.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
|
+
* WGL044: Public Artifacts
|
|
3
|
+
*
|
|
4
|
+
* Flags `artifacts:public: true`. Public artifacts are downloadable by anyone,
|
|
5
|
+
* including unauthenticated users for public projects, exposing build output and
|
|
6
|
+
* anything swept into it. Keep artifacts private unless they are deliberately
|
|
7
|
+
* meant to be world-readable.
|
|
8
|
+
*/
|
|
9
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
10
|
+
export declare const wgl044: PostSynthCheck;
|
|
11
|
+
//# sourceMappingURL=wgl044.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wgl044.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wgl044.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAK9G,eAAO,MAAM,MAAM,EAAE,cA0BpB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGL045: Credential-Bearing Artifact Path
|
|
3
|
+
*
|
|
4
|
+
* Flags an `artifacts:paths:` entry that looks like it would sweep a credential
|
|
5
|
+
* or sensitive file into the artifact (`.env`, `*.pem`, `id_rsa`, `*.key`,
|
|
6
|
+
* `.npmrc`, `.netrc`, `credentials`). Artifacts flow to later stages and are
|
|
7
|
+
* downloadable, so a captured credential leaks across the boundary. Exclude the
|
|
8
|
+
* sensitive file from the artifact path.
|
|
9
|
+
*/
|
|
10
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
11
|
+
export declare const wgl045: PostSynthCheck;
|
|
12
|
+
//# sourceMappingURL=wgl045.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wgl045.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wgl045.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAK9G,eAAO,MAAM,MAAM,EAAE,cAyCpB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGL046: Cache Populated in a Merge-Request Pipeline (Poisoning Risk)
|
|
3
|
+
*
|
|
4
|
+
* Flags a job that writes a cache (`cache:` with a push policy) and is reachable
|
|
5
|
+
* from merge-request pipelines. An outside contributor's MR can populate the
|
|
6
|
+
* cache; a later protected run that restores the same key then executes
|
|
7
|
+
* attacker-influenced contents. Restrict cache writes to protected refs, or
|
|
8
|
+
* scope cache keys so MR pipelines cannot write entries a protected run reads.
|
|
9
|
+
*/
|
|
10
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
11
|
+
export declare const wgl046: PostSynthCheck;
|
|
12
|
+
//# sourceMappingURL=wgl046.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wgl046.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wgl046.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,MAAM,EAAE,cA6BpB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGL047: Software Fetched and Executed at Runtime Without Verification
|
|
3
|
+
*
|
|
4
|
+
* Flags a `script:` command that pipes a network download straight into a shell
|
|
5
|
+
* (`curl ... | bash`, `wget ... | sh`). The fetched script is unpinned and
|
|
6
|
+
* unverified, so whoever controls the URL controls what runs in the job.
|
|
7
|
+
* Download to a file, verify a checksum/signature, then execute it.
|
|
8
|
+
*/
|
|
9
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
10
|
+
export declare const wgl047: PostSynthCheck;
|
|
11
|
+
//# sourceMappingURL=wgl047.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wgl047.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wgl047.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
|
+
* WGL048: Pipeline Without a Name
|
|
3
|
+
*
|
|
4
|
+
* Flags a pipeline that defines a `workflow:` block but no `workflow:name:`.
|
|
5
|
+
* A pipeline name shows up in the GitLab UI and audit output; naming pipelines
|
|
6
|
+
* makes runs easier to identify and review. Only flags pipelines that already
|
|
7
|
+
* customize `workflow:` (where a name is cheap to add and most useful).
|
|
8
|
+
*/
|
|
9
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
10
|
+
export declare const wgl048: PostSynthCheck;
|
|
11
|
+
//# sourceMappingURL=wgl048.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wgl048.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/wgl048.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,MAAM,EAAE,cAwBpB,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helpers for parsing serialized GitLab CI YAML in post-synth checks.
|
|
3
|
+
*
|
|
4
|
+
* Since GitLab CI output is YAML (not JSON like CloudFormation), we parse
|
|
5
|
+
* the YAML sections structurally using simple regex/string parsing. The
|
|
6
|
+
* serializer emits a predictable format so we can extract what we need
|
|
7
|
+
* without a full YAML parser dependency.
|
|
8
|
+
*/
|
|
9
|
+
export { getPrimaryOutput } from "@intentius/chant/lint/post-synth";
|
|
10
|
+
/**
|
|
11
|
+
* Parse a serialized GitLab CI YAML into a structured object.
|
|
12
|
+
* Returns null if the output can't be parsed.
|
|
13
|
+
*/
|
|
14
|
+
export interface ParsedGitLabCI {
|
|
15
|
+
stages: string[];
|
|
16
|
+
jobs: Map<string, ParsedJob>;
|
|
17
|
+
}
|
|
18
|
+
export interface ParsedJob {
|
|
19
|
+
name: string;
|
|
20
|
+
stage?: string;
|
|
21
|
+
rules?: ParsedRule[];
|
|
22
|
+
needs?: string[];
|
|
23
|
+
extends?: string[];
|
|
24
|
+
}
|
|
25
|
+
export interface ParsedRule {
|
|
26
|
+
when?: string;
|
|
27
|
+
if?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Extract stages list from serialized YAML.
|
|
31
|
+
*/
|
|
32
|
+
export declare function extractStages(yaml: string): string[];
|
|
33
|
+
/**
|
|
34
|
+
* Extract job names and their stage values from serialized YAML.
|
|
35
|
+
*/
|
|
36
|
+
export declare function extractJobs(yaml: string): Map<string, ParsedJob>;
|
|
37
|
+
/**
|
|
38
|
+
* Check whether the YAML contains an `include:` directive.
|
|
39
|
+
* When includes are present, `needs:` and `extends:` may reference
|
|
40
|
+
* jobs/templates from included files, so checks should be lenient.
|
|
41
|
+
*/
|
|
42
|
+
export declare function hasInclude(yaml: string): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Extract global variables from serialized YAML.
|
|
45
|
+
*/
|
|
46
|
+
export declare function extractGlobalVariables(yaml: string): Map<string, string>;
|
|
47
|
+
/**
|
|
48
|
+
* Extract the full section text for a given job name.
|
|
49
|
+
*/
|
|
50
|
+
export declare function extractJobSection(yaml: string, jobName: string): string | null;
|
|
51
|
+
/**
|
|
52
|
+
* Extract rules from a job section.
|
|
53
|
+
*/
|
|
54
|
+
export declare function extractJobRules(section: string): ParsedRule[];
|
|
55
|
+
/** A container image reference (job/default `image:` or a `services:` entry). */
|
|
56
|
+
export interface ImageRef {
|
|
57
|
+
/** Owning job name, or "default" for the global image. */
|
|
58
|
+
job: string;
|
|
59
|
+
/** The image reference (e.g. `node:20`). */
|
|
60
|
+
image: string;
|
|
61
|
+
/** Where the image was declared. */
|
|
62
|
+
source: "image" | "service";
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Extract container image references from `image:` and `services:` across the
|
|
66
|
+
* pipeline. Handles both the object form (`image:\n name: ...`) and the inline
|
|
67
|
+
* string form (`image: ...`).
|
|
68
|
+
*/
|
|
69
|
+
export declare function extractImageRefs(yaml: string): ImageRef[];
|
|
70
|
+
/** An `include:` entry from the top-level include block. */
|
|
71
|
+
export interface IncludeEntry {
|
|
72
|
+
kind: "project" | "remote" | "component" | "local" | "template" | "string";
|
|
73
|
+
/** The primary value (project path, URL, component address, …). */
|
|
74
|
+
value: string;
|
|
75
|
+
/** `ref:` for project includes, if present. */
|
|
76
|
+
ref?: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Parse the top-level `include:` block into structured entries.
|
|
80
|
+
*/
|
|
81
|
+
export declare function extractIncludes(yaml: string): IncludeEntry[];
|
|
82
|
+
/** True if a git ref is an immutable pin (40-hex SHA or a vN.N.N-style tag). */
|
|
83
|
+
export declare function isPinnedRef(ref: string): boolean;
|
|
84
|
+
/** An `id_tokens:` OIDC token declaration within a job. */
|
|
85
|
+
export interface IdTokenDecl {
|
|
86
|
+
job: string;
|
|
87
|
+
/** Token variable name (e.g. `GCP_ID_TOKEN`). */
|
|
88
|
+
name: string;
|
|
89
|
+
/** Declared audiences (`aud:`), empty if none. */
|
|
90
|
+
aud: string[];
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Extract `id_tokens:` declarations (OIDC) per job, with their audiences.
|
|
94
|
+
*/
|
|
95
|
+
export declare function extractIdTokens(yaml: string): IdTokenDecl[];
|
|
96
|
+
/** True if a job section's rules make it reachable from merge-request pipelines. */
|
|
97
|
+
export declare function isMergeRequestReachable(section: string): boolean;
|
|
98
|
+
/** A shell command line from a `script:` / `before_script:` / `after_script:`. */
|
|
99
|
+
export interface ScriptCommand {
|
|
100
|
+
job: string;
|
|
101
|
+
command: string;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Extract shell command lines from all `script:` family blocks, per job.
|
|
105
|
+
*/
|
|
106
|
+
export declare function extractScriptCommands(yaml: string): ScriptCommand[];
|
|
107
|
+
//# 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":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAUpD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAkFhE;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEhD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAYxE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAS9E;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,EAAE,CA8C7D;AAED,iFAAiF;AACjF,MAAM,WAAW,QAAQ;IACvB,0DAA0D;IAC1D,GAAG,EAAE,MAAM,CAAC;IACZ,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC;CAC7B;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,EAAE,CA8BzD;AAED,4DAA4D;AAC5D,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,SAAS,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAC;IAC3E,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,EAAE,CAmC5D;AAED,gFAAgF;AAChF,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAKhD;AAED,2DAA2D;AAC3D,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,GAAG,EAAE,MAAM,EAAE,CAAC;CACf;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,EAAE,CAkD3D;AAED,oFAAoF;AACpF,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEhE;AAED,kFAAkF;AAClF,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,EAAE,CA8BnE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGL004: Artifacts without expiry
|
|
3
|
+
*
|
|
4
|
+
* Artifacts without `expireIn` (or `expire_in`) will be kept indefinitely,
|
|
5
|
+
* wasting storage. Always set an expiry for job artifacts.
|
|
6
|
+
*/
|
|
7
|
+
import type { LintRule } from "@intentius/chant/lint/rule";
|
|
8
|
+
export declare const artifactNoExpiryRule: LintRule;
|
|
9
|
+
//# sourceMappingURL=artifact-no-expiry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artifact-no-expiry.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/artifact-no-expiry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,4BAA4B,CAAC;AAGxF,eAAO,MAAM,oBAAoB,EAAE,QAmDlC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vendored snapshot of well-known GitLab CI include/component source projects,
|
|
3
|
+
* used by the look-alike check (WGL032) as the reference set: an `include` or
|
|
4
|
+
* `component` source that is a near-miss (edit distance 1–2) of one of these —
|
|
5
|
+
* but not an exact match — is likely a typo or an impersonation.
|
|
6
|
+
*
|
|
7
|
+
* Advisory only. Refresh source: GitLab-maintained CI templates and the popular
|
|
8
|
+
* CI/CD Catalog components. Accept staleness — a stale entry only weakens
|
|
9
|
+
* look-alike detection, it never blocks a build.
|
|
10
|
+
*/
|
|
11
|
+
export declare const KNOWN_INCLUDE_SOURCES: readonly string[];
|
|
12
|
+
/** Levenshtein edit distance, capped: returns early once it exceeds `max`. */
|
|
13
|
+
export declare function editDistance(a: string, b: string, max: number): number;
|
|
14
|
+
//# sourceMappingURL=known-include-sources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"known-include-sources.d.ts","sourceRoot":"","sources":["../../../../src/lint/rules/data/known-include-sources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAUlD,CAAC;AAEF,8EAA8E;AAC9E,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAiBtE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vendored snapshot of GitLab CI predefined variables whose values are
|
|
3
|
+
* attacker-controllable — branch/tag names, commit and merge-request titles and
|
|
4
|
+
* descriptions, author identity. Interpolating these into a `script:` (or using
|
|
5
|
+
* them as a gate) lets a crafted branch name or commit title influence what runs.
|
|
6
|
+
*
|
|
7
|
+
* Source: GitLab "Predefined CI/CD variables" reference, filtered to the values
|
|
8
|
+
* an outside contributor can set on a fork or merge request. Advisory and
|
|
9
|
+
* necessarily incomplete; editing this list is the refresh mechanism.
|
|
10
|
+
*/
|
|
11
|
+
export declare const UNTRUSTED_CI_VARIABLES: readonly string[];
|
|
12
|
+
/** Reference forms a variable can take in a script: `$VAR` or `${VAR}`. */
|
|
13
|
+
export declare function variableReferenced(text: string, name: string): boolean;
|
|
14
|
+
//# sourceMappingURL=untrusted-variables.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"untrusted-variables.d.ts","sourceRoot":"","sources":["../../../../src/lint/rules/data/untrusted-variables.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAcnD,CAAC;AAEF,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAGtE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGL001: Deprecated only/except keywords
|
|
3
|
+
*
|
|
4
|
+
* Flags usage of `only:` and `except:` in GitLab CI jobs.
|
|
5
|
+
* These keywords are deprecated in favor of `rules:` which provides
|
|
6
|
+
* more flexible conditional execution.
|
|
7
|
+
*/
|
|
8
|
+
import type { LintRule } from "@intentius/chant/lint/rule";
|
|
9
|
+
export declare const deprecatedOnlyExceptRule: LintRule;
|
|
10
|
+
//# sourceMappingURL=deprecated-only-except.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecated-only-except.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/deprecated-only-except.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,4BAA4B,CAAC;AAGxF,eAAO,MAAM,wBAAwB,EAAE,QAyCtC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitLab CI/CD lint rules
|
|
3
|
+
*/
|
|
4
|
+
export { deprecatedOnlyExceptRule } from "./deprecated-only-except.js";
|
|
5
|
+
export { missingScriptRule } from "./missing-script.js";
|
|
6
|
+
export { missingStageRule } from "./missing-stage.js";
|
|
7
|
+
export { artifactNoExpiryRule } from "./artifact-no-expiry.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGL002: Missing script
|
|
3
|
+
*
|
|
4
|
+
* A GitLab CI job must have `script`, `trigger`, or `run` defined.
|
|
5
|
+
* Jobs without any of these will fail pipeline validation.
|
|
6
|
+
*/
|
|
7
|
+
import type { LintRule } from "@intentius/chant/lint/rule";
|
|
8
|
+
export declare const missingScriptRule: LintRule;
|
|
9
|
+
//# sourceMappingURL=missing-script.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"missing-script.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/missing-script.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,4BAA4B,CAAC;AAKxF,eAAO,MAAM,iBAAiB,EAAE,QAoD/B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGL003: Missing stage
|
|
3
|
+
*
|
|
4
|
+
* Jobs should declare a `stage` property. Without it, the job defaults
|
|
5
|
+
* to the "test" stage which may not be the intended behavior.
|
|
6
|
+
*/
|
|
7
|
+
import type { LintRule } from "@intentius/chant/lint/rule";
|
|
8
|
+
export declare const missingStageRule: LintRule;
|
|
9
|
+
//# sourceMappingURL=missing-stage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"missing-stage.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/missing-stage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,4BAA4B,CAAC;AAGxF,eAAO,MAAM,gBAAgB,EAAE,QAmD9B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CompletionContext, CompletionItem } from "@intentius/chant/lsp/types";
|
|
2
|
+
/**
|
|
3
|
+
* Provide GitLab CI completions based on context.
|
|
4
|
+
*/
|
|
5
|
+
export declare function gitlabCompletions(ctx: CompletionContext): CompletionItem[];
|
|
6
|
+
//# sourceMappingURL=completions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"completions.d.ts","sourceRoot":"","sources":["../../src/lsp/completions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAapF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,iBAAiB,GAAG,cAAc,EAAE,CAE1E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hover.d.ts","sourceRoot":"","sources":["../../src/lsp/hover.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAa1E;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,YAAY,GAAG,SAAS,GAAG,SAAS,CAEpE"}
|
package/dist/manifest.json
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read-only MCP tools that expose what `chant build` already computes about a
|
|
3
|
+
* GitLab pipeline — its stages and jobs, what it pulls in from outside, its
|
|
4
|
+
* security findings — so an agent can ask about a change *before it runs or
|
|
5
|
+
* merges* (#327, #328).
|
|
6
|
+
*
|
|
7
|
+
* Every tool here builds from source and returns data. None of them touch the
|
|
8
|
+
* live GitLab instance, read run history, or write anything — that boundary is
|
|
9
|
+
* what keeps chant a context producer and not a copy of the live tooling.
|
|
10
|
+
*/
|
|
11
|
+
import type { McpToolContribution } from "@intentius/chant/mcp/types";
|
|
12
|
+
/** Is a component address (`host/group/comp@version`) pinned to a fixed version? */
|
|
13
|
+
export declare function componentPinned(value: string): boolean;
|
|
14
|
+
/** The YAML job name a build entity serializes to (camelCase → kebab-case). */
|
|
15
|
+
export declare function jobNameOf(entityName: string): string;
|
|
16
|
+
/** Jobs that would re-run because they depend (transitively) on `job`. */
|
|
17
|
+
export declare function downstreamJobs(yaml: string, job: string): string[];
|
|
18
|
+
/** The read-only context tools for the GitLab lexicon. */
|
|
19
|
+
export declare function gitlabContextTools(): McpToolContribution[];
|
|
20
|
+
//# sourceMappingURL=context-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-tools.d.ts","sourceRoot":"","sources":["../../src/mcp/context-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAyBtE,oFAAoF;AACpF,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAGtD;AAED,+EAA+E;AAC/E,wBAAgB,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEpD;AAkBD,0EAA0E;AAC1E,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAuBlE;AASD,0DAA0D;AAC1D,wBAAgB,kBAAkB,IAAI,mBAAmB,EAAE,CAkL1D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Action mapping registry — public surface.
|
|
3
|
+
*
|
|
4
|
+
* Tier 1 mappings auto-register into the default registry on import of
|
|
5
|
+
* this module. Tier 2 and Tier 3 are added in #88.
|
|
6
|
+
*/
|
|
7
|
+
export type { ActionMapping, ActionMapCtx, ActionMappedResult, ActionMappingRegistry, } from "./registry.js";
|
|
8
|
+
export { createRegistry, getDefaultRegistry, lookupAction, setDefaultRegistry } from "./registry.js";
|
|
9
|
+
import { registerTier1 } from "./tier-1.js";
|
|
10
|
+
import { registerTier2 } from "./tier-2.js";
|
|
11
|
+
import { registerTier3 } from "./tier-3.js";
|
|
12
|
+
export { registerTier1, registerTier2, registerTier3 };
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/migrate/from-github/actions/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY,EACV,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAElG,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AASzC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ActionMapping registry for GitHub Actions → GitLab CI translation.
|
|
3
|
+
*
|
|
4
|
+
* Each marketplace action gets a typed mapping that returns the GitLab-side
|
|
5
|
+
* effects (script lines, image substitution, services, cache, artifacts,
|
|
6
|
+
* job-level variables) plus provenance records.
|
|
7
|
+
*
|
|
8
|
+
* v1 ships a built-in registry covering 33 actions (Tier 1/2/3, see
|
|
9
|
+
* `tier-1.ts`/`tier-2.ts`/`tier-3.ts`). Users can inject their own
|
|
10
|
+
* mappings via `MigrateOptions.registry`.
|
|
11
|
+
*/
|
|
12
|
+
import type { ProvenanceRecord } from "../provenance.js";
|
|
13
|
+
export interface ActionMapCtx {
|
|
14
|
+
/** GitLab IR job logicalId */
|
|
15
|
+
logicalId: string;
|
|
16
|
+
/** Original GitHub job name (kebab-case) */
|
|
17
|
+
jobName: string;
|
|
18
|
+
/** Source file (for provenance) */
|
|
19
|
+
sourceFile?: string;
|
|
20
|
+
/** 0-based step index within the job */
|
|
21
|
+
stepIndex: number;
|
|
22
|
+
}
|
|
23
|
+
export interface ActionMappedResult {
|
|
24
|
+
/** Lines appended to the GitLab job `script:` */
|
|
25
|
+
scriptLines: string[];
|
|
26
|
+
/** Lines prepended to the GitLab job `before_script:` */
|
|
27
|
+
beforeScript?: string[];
|
|
28
|
+
/** Job-level image override (last write wins) */
|
|
29
|
+
image?: string;
|
|
30
|
+
/** Job-level services to add */
|
|
31
|
+
services?: unknown[];
|
|
32
|
+
/** Job-level cache config */
|
|
33
|
+
cache?: Record<string, unknown>;
|
|
34
|
+
/** Job-level artifacts config */
|
|
35
|
+
artifacts?: Record<string, unknown>;
|
|
36
|
+
/** Job-level variables to merge */
|
|
37
|
+
variables?: Record<string, unknown>;
|
|
38
|
+
/** Provenance records for this mapping firing */
|
|
39
|
+
provenance: ProvenanceRecord[];
|
|
40
|
+
}
|
|
41
|
+
export interface ActionMapping {
|
|
42
|
+
/** Action name without version, e.g. "actions/checkout" */
|
|
43
|
+
actionName: string;
|
|
44
|
+
/** Optional version filter (matches against major version) */
|
|
45
|
+
majorVersions?: string[];
|
|
46
|
+
/** Tier (1: must-have, 2: common, 3: niche) */
|
|
47
|
+
tier: 1 | 2 | 3;
|
|
48
|
+
/** Apply the mapping to a step */
|
|
49
|
+
translate(step: Record<string, unknown>, ctx: ActionMapCtx): ActionMappedResult;
|
|
50
|
+
}
|
|
51
|
+
export interface ActionMappingRegistry {
|
|
52
|
+
register(mapping: ActionMapping): void;
|
|
53
|
+
lookup(actionRef: string): ActionMapping | undefined;
|
|
54
|
+
}
|
|
55
|
+
export declare function getDefaultRegistry(): ActionMappingRegistry;
|
|
56
|
+
/**
|
|
57
|
+
* Test-only: replace the default registry. Used by `lookupAction` callers
|
|
58
|
+
* that pass `opts.registry` to inject a stub. Reset to undefined to restore.
|
|
59
|
+
*/
|
|
60
|
+
export declare function setDefaultRegistry(registry: ActionMappingRegistry | undefined): void;
|
|
61
|
+
export declare function createRegistry(): ActionMappingRegistry;
|
|
62
|
+
export declare function lookupAction(actionRef: string, registry?: ActionMappingRegistry): ActionMapping | undefined;
|
|
63
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/migrate/from-github/actions/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,MAAM,WAAW,YAAY;IAC3B,8BAA8B;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,iDAAiD;IACjD,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,iDAAiD;IACjD,UAAU,EAAE,gBAAgB,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,aAAa;IAC5B,2DAA2D;IAC3D,UAAU,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,+CAA+C;IAC/C,IAAI,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAChB,kCAAkC;IAClC,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,YAAY,GAAG,kBAAkB,CAAC;CACjF;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAAC;IACvC,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;CACtD;AAgCD,wBAAgB,kBAAkB,IAAI,qBAAqB,CAK1D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,SAAS,GAAG,IAAI,CAEpF;AAED,wBAAgB,cAAc,IAAI,qBAAqB,CAEtD;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,qBAAqB,GAAG,aAAa,GAAG,SAAS,CAE3G"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tier 1 marketplace action mappings — the 14 most-used GitHub Actions
|
|
3
|
+
* marketplace actions, per the upstream skill's `references/marketplace-actions.md`.
|
|
4
|
+
*
|
|
5
|
+
* Each mapping returns:
|
|
6
|
+
* - scriptLines: appended to job.script
|
|
7
|
+
* - image: job-level image override (last write wins)
|
|
8
|
+
* - services: docker:dind etc.
|
|
9
|
+
* - cache / artifacts: native GitLab keywords
|
|
10
|
+
* - provenance: per-step records
|
|
11
|
+
*/
|
|
12
|
+
import type { ActionMapping } from "./registry.js";
|
|
13
|
+
declare const TIER_1_MAPPINGS: ActionMapping[];
|
|
14
|
+
/**
|
|
15
|
+
* Register all Tier 1 mappings into the given registry (or default).
|
|
16
|
+
* Idempotent — call before `lookupAction` is first invoked.
|
|
17
|
+
*/
|
|
18
|
+
export declare function registerTier1(registry?: import("./registry.js").ActionMappingRegistry): void;
|
|
19
|
+
export { TIER_1_MAPPINGS };
|
|
20
|
+
//# sourceMappingURL=tier-1.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tier-1.d.ts","sourceRoot":"","sources":["../../../../src/migrate/from-github/actions/tier-1.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAoC,MAAM,YAAY,CAAC;AA6RlF,QAAA,MAAM,eAAe,EAAE,aAAa,EAenC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,aAAa,CAAC,QAAQ,6CAAuB,GAAG,IAAI,CAInE;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tier 2 marketplace action mappings — 14 common actions from the
|
|
3
|
+
* upstream skill's `references/marketplace-actions.md`.
|
|
4
|
+
*/
|
|
5
|
+
import type { ActionMapping } from "./registry.js";
|
|
6
|
+
declare const TIER_2_MAPPINGS: ActionMapping[];
|
|
7
|
+
export declare function registerTier2(registry?: import("./registry.js").ActionMappingRegistry): void;
|
|
8
|
+
export { TIER_2_MAPPINGS };
|
|
9
|
+
//# sourceMappingURL=tier-2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tier-2.d.ts","sourceRoot":"","sources":["../../../../src/migrate/from-github/actions/tier-2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAoC,MAAM,YAAY,CAAC;AA2QlF,QAAA,MAAM,eAAe,EAAE,aAAa,EAenC,CAAC;AAEF,wBAAgB,aAAa,CAAC,QAAQ,6CAAuB,GAAG,IAAI,CAInE;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tier 3 marketplace action mappings — 5 niche actions. Several map to
|
|
3
|
+
* native GitLab keywords (rules:changes, retry:) rather than scripts.
|
|
4
|
+
*/
|
|
5
|
+
import type { ActionMapping } from "./registry.js";
|
|
6
|
+
declare const TIER_3_MAPPINGS: ActionMapping[];
|
|
7
|
+
export declare function registerTier3(registry?: import("./registry.js").ActionMappingRegistry): void;
|
|
8
|
+
export { TIER_3_MAPPINGS };
|
|
9
|
+
//# sourceMappingURL=tier-3.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tier-3.d.ts","sourceRoot":"","sources":["../../../../src/migrate/from-github/actions/tier-3.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAoC,MAAM,YAAY,CAAC;AAwGlF,QAAA,MAAM,eAAe,EAAE,aAAa,EAMnC,CAAC;AAEF,wBAAgB,aAAa,CAAC,QAAQ,6CAAuB,GAAG,IAAI,CAInE;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|