@intentius/chant-lexicon-gitlab 0.54.3 → 0.56.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "algorithm": "sha256",
3
3
  "artifacts": {
4
- "manifest.json": "e87c43d9cb00e94d0f53c692e7d29cd0a83c55ebe064d68b76e7f0892eadb45c",
4
+ "manifest.json": "2d555a71e6c5f87541933dc5961f4d8ee115b98a3113d48c7368362e217c7e44",
5
5
  "meta.json": "931fc3246a55645b1493080bbeb160e5d205e42349e8bdca96ca243adb5f0da3",
6
6
  "types/index.d.ts": "5cd2e99f135a929b72bdd822d00d780d39b1cd407ba0cfb3d511c7ac9d667b58",
7
7
  "rules/artifact-no-expiry.ts": "3f3cabf9792cbf8207e53a25f506715466b19ec25e9c3b4d0d77fed6b2eb4542",
@@ -55,5 +55,5 @@
55
55
  "skills/chant-gitlab-migrate.md": "4853d04980560b379e5b0f7267dcb0a1e5d5879cb9e9931681ce76b2a5fe69d8",
56
56
  "skills/chant-gitlab-patterns.md": "6d9a44e9e8de4c3820be9d65381b0d2ede4cb3626aaaf0011e21838a9fbf556e"
57
57
  },
58
- "composite": "9b4849c8012da2a3aa52211ff9b51747531688587ab091a1f95cef6916886693"
58
+ "composite": "23a82eb88eb182226439ef2d6a90df9a6e2fa6552f1788eff10ae340482de92f"
59
59
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitlab",
3
- "version": "0.54.3",
3
+ "version": "0.56.0",
4
4
  "chantVersion": ">=0.1.0",
5
5
  "namespace": "GitLab",
6
6
  "intrinsics": [
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAiC,MAAM,0BAA0B,CAAC;AAoB7F,eAAO,MAAM,YAAY,EAAE,aA8gB1B,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAiC,MAAM,0BAA0B,CAAC;AAoB7F,eAAO,MAAM,YAAY,EAAE,aAmhB1B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-gitlab",
3
- "version": "0.54.3",
3
+ "version": "0.56.0",
4
4
  "description": "GitLab CI lexicon for chant — declarative IaC in TypeScript",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
@@ -67,8 +67,8 @@
67
67
  "typescript": "^5.9.3"
68
68
  },
69
69
  "peerDependencies": {
70
- "@intentius/chant": "^0.54.3",
71
- "@intentius/chant-lexicon-github": "^0.54.3",
70
+ "@intentius/chant": "^0.56.0",
71
+ "@intentius/chant-lexicon-github": "^0.56.0",
72
72
  "typescript": "^5.9.3"
73
73
  },
74
74
  "peerDependenciesMeta": {
@@ -213,6 +213,28 @@ describe("gitlabPlugin", () => {
213
213
  expect(typeof gen.generate).toBe("function");
214
214
  });
215
215
 
216
+ // -----------------------------------------------------------------------
217
+ // Migration source (#2066)
218
+ // -----------------------------------------------------------------------
219
+
220
+ test("migrationSource transform passes security through and returns securityPosture", async () => {
221
+ const src = gitlabPlugin.migrationSource!("github")!;
222
+ const workflow = `on: push
223
+ jobs:
224
+ build:
225
+ runs-on: ubuntu-latest
226
+ steps:
227
+ - run: echo "$TOKEN"
228
+ env:
229
+ TOKEN: \${{ secrets.TOKEN }}
230
+ `;
231
+ const result = await src.transform(workflow, { emit: "yaml", security: true });
232
+ expect(result.securityPosture).toContain("## Security posture");
233
+ // The security option reached the transform: the secret-reference fate
234
+ // shows up as a posture row, not the "nothing detected" fallback.
235
+ expect(result.securityPosture).toContain("Secret reference");
236
+ });
237
+
216
238
  // -----------------------------------------------------------------------
217
239
  // Skills
218
240
  // -----------------------------------------------------------------------
package/src/plugin.ts CHANGED
@@ -289,6 +289,7 @@ export const test = new Job({
289
289
  emit: { type: "string", enum: ["yaml", "ts"], description: "Output format (default: yaml)" },
290
290
  useComposites: { type: "boolean", description: "Recognise composite patterns and emit NodePipeline/NodeCI calls" },
291
291
  strict: { type: "boolean", description: "Escalate needs-review diagnostics to errors" },
292
+ security: { type: "boolean", description: "Run security-aware migration analysis (classify property fates + GitLab security checks)" },
292
293
  },
293
294
  required: ["content"],
294
295
  },
@@ -298,6 +299,7 @@ export const test = new Job({
298
299
  emit: (params.emit as "yaml" | "ts" | undefined) ?? "yaml",
299
300
  useComposites: !!params.useComposites,
300
301
  strict: !!params.strict,
302
+ security: !!params.security,
301
303
  sourceFile: "<mcp-input>",
302
304
  });
303
305
  return {
@@ -305,6 +307,7 @@ export const test = new Job({
305
307
  diagnostics: result.diagnostics,
306
308
  provenance: result.provenance,
307
309
  stages: result.stages,
310
+ securityPosture: result.securityPosture,
308
311
  };
309
312
  },
310
313
  },
@@ -326,6 +329,7 @@ export const test = new Job({
326
329
  useComposites: opts.useComposites,
327
330
  sourceFile: opts.sourceFile,
328
331
  strict: opts.strict,
332
+ security: opts.security,
329
333
  });
330
334
  // The composites rewriter (when enabled) replaces several Job
331
335
  // resources with a single Composite resource — stages: in the
@@ -336,6 +340,7 @@ export const test = new Job({
336
340
  output: result.output,
337
341
  provenance: result.provenance as unknown as Array<Record<string, unknown>>,
338
342
  diagnostics: result.diagnostics as unknown as Array<Record<string, unknown>>,
343
+ securityPosture: result.securityPosture,
339
344
  };
340
345
  },
341
346
  };