@intentius/chant 0.1.23 → 0.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant",
3
- "version": "0.1.23",
3
+ "version": "0.2.0",
4
4
  "description": "Declarative infrastructure-as-code toolkit — TypeScript on Node.js",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
@@ -96,6 +96,9 @@ export async function migrateCommand(opts: MigrateCliOpts): Promise<MigrateCliRe
96
96
  useComposites: opts.useComposites,
97
97
  sourceFile: opts.sourceFile,
98
98
  strict: opts.strict,
99
+ // --validate also runs the target lexicon's security checks against the
100
+ // migrated output and classifies security-property fates (#306).
101
+ security: opts.validate,
99
102
  });
100
103
  } catch (err) {
101
104
  return {
@@ -168,7 +171,11 @@ export async function migrateCommand(opts: MigrateCliOpts): Promise<MigrateCliRe
168
171
  }
169
172
 
170
173
  // Markdown summary (always to stderr — leaves stdout clean for piping)
171
- const markdownSummary = formatMarkdownSummary(result.provenance, result.diagnostics, content);
174
+ let markdownSummary = formatMarkdownSummary(result.provenance, result.diagnostics, content);
175
+ // Append the security posture section when security analysis ran (#306).
176
+ if (result.securityPosture) {
177
+ markdownSummary += `\n\n${result.securityPosture}`;
178
+ }
172
179
 
173
180
  // Determine exit code: any error-severity diagnostic fails when --strict.
174
181
  // The transformer already escalates needs-review → error when opts.strict
package/src/lexicon.ts CHANGED
@@ -109,6 +109,9 @@ export interface MigrateOptions {
109
109
  sourceFile?: string;
110
110
  /** Escalate needs-review diagnostics to errors. */
111
111
  strict?: boolean;
112
+ /** Run security-aware migration analysis (classify property fates + run
113
+ * target security checks). Enabled by `chant migrate --validate`. */
114
+ security?: boolean;
112
115
  }
113
116
 
114
117
  /**
@@ -125,6 +128,8 @@ export interface MigrationResult {
125
128
  provenance: Array<Record<string, unknown>>;
126
129
  /** SARIF-shaped diagnostics. */
127
130
  diagnostics: Array<Record<string, unknown>>;
131
+ /** Markdown "Security posture" section, when security analysis ran (#306). */
132
+ securityPosture?: string;
128
133
  }
129
134
 
130
135
  /**