@fourier-labs/harbour-contracts 0.29.0 → 0.30.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,12 +1,12 @@
1
1
  {
2
2
  "schema": "harbour.contract-release/1.0",
3
- "repositoryVersion": "0.29.0.0",
4
- "publishVersion": "0.29.0",
5
- "publishTag": "v0.29.0",
6
- "schemasDigest": "sha256:4b21ea9a6b13193a189d2499f6cc8f24975db18686e64d2042490a85dca669fc",
3
+ "repositoryVersion": "0.30.0.0",
4
+ "publishVersion": "0.30.0",
5
+ "publishTag": "v0.30.0",
6
+ "schemasDigest": "sha256:f2fac98b4ea48578a3a7cc15008b0bc2db5c771fd46c68613159b5c8ac000887",
7
7
  "aiFixturesDigest": "sha256:edac31c92e146ca1c40130f2fb5649db82e24b8cd1ac758153b90612052fddb6",
8
- "generatedGoDigest": "sha256:6e5af7342005ceb5b2a175b3d5c3eb27e06fe5bfa57e74e2e854038b5f8cbad6",
9
- "generatedTypeScriptDigest": "sha256:b6201aeb54e733aaf4f33c2bdf75054b3e10b1616e031620cce15ee72fb37770",
8
+ "generatedGoDigest": "sha256:da46f772799e1eb8fd530c3eb34937a8cfbf218f5ea6288f6614fe69cd3b3bc3",
9
+ "generatedTypeScriptDigest": "sha256:5e6ce1d6fb4b8dbcbab57b4495707fe323abd8d8a0433438aee16f57a000932c",
10
10
  "generatedExclusions": {
11
11
  "gen-go/contract_release.go": "contains the generated aggregate digests (self-reference)",
12
12
  "gen-ts/contract-release.ts": "contains the generated aggregate digests (self-reference)"
@@ -51,7 +51,7 @@
51
51
  "schema/promotion-response.schema.json": "sha256:4129712d2e29d6ef21d93d4bd0bacfd60ada3f2ee0ade852824e64346b817634",
52
52
  "schema/sanitized-binding-evidence.schema.json": "sha256:b03bcc1911c99c69fda50eb656fc3e115f88fe2990c1708fbb5cd3542f4b8bba",
53
53
  "schema/secret-reference.schema.json": "sha256:966f7a6d2575b46a4b54804d06dc05c6229ebbcbd9200fe6a6c8d3b4ffb90f9f",
54
- "schema/security-scan-input.schema.json": "sha256:9f9c9e6131c1abee454320b77e4332e3780c0c63f108f54f75c93194a32ccff7",
54
+ "schema/security-scan-input.schema.json": "sha256:83502dffb3c07ac2e0698928e6dc123f454fc667d4aacd336bcad6944ef2ac3d",
55
55
  "schema/security-verdict.schema.json": "sha256:ec3c2d5c9df3601aeed0909b36c7f427469c7f0eeb3295c5809b96d09bf3fc26",
56
56
  "schema/transform-report.schema.json": "sha256:815e764445fb41b912d0c0468f00621ad61f941fb4c7b9364e3f204ad47cdf7f",
57
57
  "schema/version-state.schema.json": "sha256:e7c4b2e7b615ebb07f36d0df22ded51b2c9688ef9e9bfe79de1d5cd94de9ae40"
@@ -93,7 +93,7 @@
93
93
  "gen-go/doc.go": "sha256:c17bc2d39ed175ce7105c68305f8ae7152f659eb7cd187ecceee7698eb3a65dd",
94
94
  "gen-go/error_category.go": "sha256:a8b64524be3716e62ca6016e56f2332a56fa5e16e42647421e516aa01a7d6806",
95
95
  "gen-go/schema_documents.go": "sha256:4b9094aaf0acc4bae4b65784954853f0888572a53fa1a1dc354f97c88ded805f",
96
- "gen-go/types.go": "sha256:bf6906826f4d1c490954cc4354322bf508c392cfc4b72a9a6fe9890f6b5a8d99",
96
+ "gen-go/types.go": "sha256:fccee4956ef19c796aae7c9f6ed346b6ccdedbb35f4d801f5970ff8ecb96a2c3",
97
97
  "gen-go/version_state.go": "sha256:827f8768359998409b86ea02d9ba1a149981928bae7161e4dc95fe0520ce7410"
98
98
  },
99
99
  "generatedTypeScript": {
@@ -142,7 +142,7 @@
142
142
  "gen-ts/sanitized-binding-digest-helper.ts": "sha256:c47d7fdc20500e2e72c23fe39ecdd610fc397c47fcba51335ebec3c380fe6872",
143
143
  "gen-ts/sanitized-binding-evidence.ts": "sha256:4db7e9ed83f563a46e337815a55bbd6433864c41d9ec8e8a80810a16e3095ebb",
144
144
  "gen-ts/secret-reference.ts": "sha256:a8b65de72705b6f51f57cd8ca58881483108005b1fa4d19106c3e9cf1fa877e7",
145
- "gen-ts/security-scan-input.ts": "sha256:5d9bde7394d8b34cca1d36b51ce17bf73cfccd9cfd7cab810f83d4de58f22285",
145
+ "gen-ts/security-scan-input.ts": "sha256:b31f048be04c34b40f49d3b3ba53277e473cd435ae9216ba3a3b4dac69fb5685",
146
146
  "gen-ts/security-verdict.ts": "sha256:fea950cddbd12fe0218e2573c9a29c6748d56612a464559f1e6d688fa97f68c7",
147
147
  "gen-ts/transform-report.ts": "sha256:6c54b579884d98135d73945d00980820b136f269622db27fa56a1c4c0e57d3b6",
148
148
  "gen-ts/version-state-machine.ts": "sha256:4371bc7e2bde86b0447f5242104c576cc160dfd7dae1885acbfb63540f230bdd",
@@ -1,7 +1,7 @@
1
- export declare const ContractRepositoryVersion: "0.29.0.0";
2
- export declare const ContractPublishVersion: "0.29.0";
3
- export declare const ContractPublishTag: "v0.29.0";
4
- export declare const ContractSchemasDigest: "sha256:4b21ea9a6b13193a189d2499f6cc8f24975db18686e64d2042490a85dca669fc";
1
+ export declare const ContractRepositoryVersion: "0.30.0.0";
2
+ export declare const ContractPublishVersion: "0.30.0";
3
+ export declare const ContractPublishTag: "v0.30.0";
4
+ export declare const ContractSchemasDigest: "sha256:f2fac98b4ea48578a3a7cc15008b0bc2db5c771fd46c68613159b5c8ac000887";
5
5
  export declare const ContractAiFixturesDigest: "sha256:edac31c92e146ca1c40130f2fb5649db82e24b8cd1ac758153b90612052fddb6";
6
- export declare const ContractGeneratedGoDigest: "sha256:6e5af7342005ceb5b2a175b3d5c3eb27e06fe5bfa57e74e2e854038b5f8cbad6";
7
- export declare const ContractGeneratedTypeScriptDigest: "sha256:b6201aeb54e733aaf4f33c2bdf75054b3e10b1616e031620cce15ee72fb37770";
6
+ export declare const ContractGeneratedGoDigest: "sha256:da46f772799e1eb8fd530c3eb34937a8cfbf218f5ea6288f6614fe69cd3b3bc3";
7
+ export declare const ContractGeneratedTypeScriptDigest: "sha256:5e6ce1d6fb4b8dbcbab57b4495707fe323abd8d8a0433438aee16f57a000932c";
@@ -1,9 +1,9 @@
1
1
  /* eslint-disable */
2
2
  // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
- export const ContractRepositoryVersion = "0.29.0.0";
4
- export const ContractPublishVersion = "0.29.0";
5
- export const ContractPublishTag = "v0.29.0";
6
- export const ContractSchemasDigest = "sha256:4b21ea9a6b13193a189d2499f6cc8f24975db18686e64d2042490a85dca669fc";
3
+ export const ContractRepositoryVersion = "0.30.0.0";
4
+ export const ContractPublishVersion = "0.30.0";
5
+ export const ContractPublishTag = "v0.30.0";
6
+ export const ContractSchemasDigest = "sha256:f2fac98b4ea48578a3a7cc15008b0bc2db5c771fd46c68613159b5c8ac000887";
7
7
  export const ContractAiFixturesDigest = "sha256:edac31c92e146ca1c40130f2fb5649db82e24b8cd1ac758153b90612052fddb6";
8
- export const ContractGeneratedGoDigest = "sha256:6e5af7342005ceb5b2a175b3d5c3eb27e06fe5bfa57e74e2e854038b5f8cbad6";
9
- export const ContractGeneratedTypeScriptDigest = "sha256:b6201aeb54e733aaf4f33c2bdf75054b3e10b1616e031620cce15ee72fb37770";
8
+ export const ContractGeneratedGoDigest = "sha256:da46f772799e1eb8fd530c3eb34937a8cfbf218f5ea6288f6614fe69cd3b3bc3";
9
+ export const ContractGeneratedTypeScriptDigest = "sha256:5e6ce1d6fb4b8dbcbab57b4495707fe323abd8d8a0433438aee16f57a000932c";
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Input to the Harbour Security Assurance machine (Security Assurance LLD §2). M1 runs the SOURCE phase only; ARTIFACT is reserved in the enum so the contract is stable through M2. `commit` is the identity being scanned; `org/app/env` locate the snapshot (the control-state table has no commit GSI, so a bare commit is not resolvable); `branch` is caller-supplied provenance.
2
+ * Input to the Harbour Security Assurance machine (Security Assurance LLD §2). SOURCE (M1) scans an ingested commit; ARTIFACT (M2) scans built outputs — a container image digest, a deployable bundle, and/or synthesized infrastructure — named directly by the caller. `commit` is the identity being scanned; `org/app/env` locate the snapshot (the control-state table has no commit GSI, so a bare commit is not resolvable); `branch` is caller-supplied provenance. When phase is ARTIFACT at least one of `imageDigest`, `bundleRef`, or `infraRefs` must be present.
3
3
  */
4
4
  export interface SecurityScanInput {
5
5
  /**
6
- * Scan phase. M1 implements SOURCE only; ARTIFACT is reserved for M2 (image scan against an ECR digest) and is rejected by the machine until then.
6
+ * Scan phase. SOURCE (M1) scans the ingested snapshot for the commit; ARTIFACT (M2) scans built outputs named by imageDigest/bundleRef/infraRefs — at least one of which must be present.
7
7
  */
8
8
  phase: 'SOURCE' | 'ARTIFACT';
9
9
  /**
@@ -34,4 +34,55 @@ export interface SecurityScanInput {
34
34
  * Data classification of the app. Optional in v1 (decided 2026-08-27): when ABSENT the machine assumes the STANDARD profile and stamps classificationDefaulted: true in the verdict provenance. An invalid value still fails closed — only absence defaults. No classifier exists until M4; until then callers state it or accept the default.
35
35
  */
36
36
  classification?: 'GREEN' | 'YELLOW' | 'ORANGE' | 'RED';
37
+ /**
38
+ * ARTIFACT phase: container image to scan, as either a digest-qualified ECR reference (<ecr-uri>@sha256:<64-hex>) or a bare sha256:<64-hex> digest. Digest-addressed only — tags are not accepted, so the scanned bytes are the deployed bytes.
39
+ */
40
+ imageDigest?: string;
41
+ bundleRef?: S3Ref;
42
+ /**
43
+ * ARTIFACT phase: S3 locations of synthesized infrastructure documents (e.g. CloudFormation templates) evaluated by policy (OPA/rego) checks.
44
+ *
45
+ * @minItems 1
46
+ */
47
+ infraRefs?: S3Ref1[];
48
+ /**
49
+ * Optional build-source provenance for ARTIFACT calls where the top-level repo/commit describe the source of the build rather than the artifact itself; stamped into verdict provenance verbatim.
50
+ */
51
+ provenance?: {
52
+ /**
53
+ * GitHub owner/name of the build-source repository.
54
+ */
55
+ repo: string;
56
+ /**
57
+ * Full 40-hex lowercase commit SHA the artifact was built from.
58
+ */
59
+ commit: string;
60
+ /**
61
+ * Branch the artifact was built from, caller-supplied provenance.
62
+ */
63
+ branch?: string;
64
+ };
65
+ }
66
+ /**
67
+ * ARTIFACT phase: S3 location of the built deployable bundle to scan.
68
+ */
69
+ export interface S3Ref {
70
+ /**
71
+ * S3 bucket name.
72
+ */
73
+ bucket: string;
74
+ /**
75
+ * S3 object key.
76
+ */
77
+ key: string;
78
+ }
79
+ export interface S3Ref1 {
80
+ /**
81
+ * S3 bucket name.
82
+ */
83
+ bucket: string;
84
+ /**
85
+ * S3 object key.
86
+ */
87
+ key: string;
37
88
  }
@@ -1,10 +1,10 @@
1
1
  /* eslint-disable */
2
2
  // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
3
 
4
- export const ContractRepositoryVersion = "0.29.0.0" as const;
5
- export const ContractPublishVersion = "0.29.0" as const;
6
- export const ContractPublishTag = "v0.29.0" as const;
7
- export const ContractSchemasDigest = "sha256:4b21ea9a6b13193a189d2499f6cc8f24975db18686e64d2042490a85dca669fc" as const;
4
+ export const ContractRepositoryVersion = "0.30.0.0" as const;
5
+ export const ContractPublishVersion = "0.30.0" as const;
6
+ export const ContractPublishTag = "v0.30.0" as const;
7
+ export const ContractSchemasDigest = "sha256:f2fac98b4ea48578a3a7cc15008b0bc2db5c771fd46c68613159b5c8ac000887" as const;
8
8
  export const ContractAiFixturesDigest = "sha256:edac31c92e146ca1c40130f2fb5649db82e24b8cd1ac758153b90612052fddb6" as const;
9
- export const ContractGeneratedGoDigest = "sha256:6e5af7342005ceb5b2a175b3d5c3eb27e06fe5bfa57e74e2e854038b5f8cbad6" as const;
10
- export const ContractGeneratedTypeScriptDigest = "sha256:b6201aeb54e733aaf4f33c2bdf75054b3e10b1616e031620cce15ee72fb37770" as const;
9
+ export const ContractGeneratedGoDigest = "sha256:da46f772799e1eb8fd530c3eb34937a8cfbf218f5ea6288f6614fe69cd3b3bc3" as const;
10
+ export const ContractGeneratedTypeScriptDigest = "sha256:5e6ce1d6fb4b8dbcbab57b4495707fe323abd8d8a0433438aee16f57a000932c" as const;
@@ -2,11 +2,11 @@
2
2
  // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
3
 
4
4
  /**
5
- * Input to the Harbour Security Assurance machine (Security Assurance LLD §2). M1 runs the SOURCE phase only; ARTIFACT is reserved in the enum so the contract is stable through M2. `commit` is the identity being scanned; `org/app/env` locate the snapshot (the control-state table has no commit GSI, so a bare commit is not resolvable); `branch` is caller-supplied provenance.
5
+ * Input to the Harbour Security Assurance machine (Security Assurance LLD §2). SOURCE (M1) scans an ingested commit; ARTIFACT (M2) scans built outputs — a container image digest, a deployable bundle, and/or synthesized infrastructure — named directly by the caller. `commit` is the identity being scanned; `org/app/env` locate the snapshot (the control-state table has no commit GSI, so a bare commit is not resolvable); `branch` is caller-supplied provenance. When phase is ARTIFACT at least one of `imageDigest`, `bundleRef`, or `infraRefs` must be present.
6
6
  */
7
7
  export interface SecurityScanInput {
8
8
  /**
9
- * Scan phase. M1 implements SOURCE only; ARTIFACT is reserved for M2 (image scan against an ECR digest) and is rejected by the machine until then.
9
+ * Scan phase. SOURCE (M1) scans the ingested snapshot for the commit; ARTIFACT (M2) scans built outputs named by imageDigest/bundleRef/infraRefs — at least one of which must be present.
10
10
  */
11
11
  phase: 'SOURCE' | 'ARTIFACT';
12
12
  /**
@@ -37,4 +37,55 @@ export interface SecurityScanInput {
37
37
  * Data classification of the app. Optional in v1 (decided 2026-08-27): when ABSENT the machine assumes the STANDARD profile and stamps classificationDefaulted: true in the verdict provenance. An invalid value still fails closed — only absence defaults. No classifier exists until M4; until then callers state it or accept the default.
38
38
  */
39
39
  classification?: 'GREEN' | 'YELLOW' | 'ORANGE' | 'RED';
40
+ /**
41
+ * ARTIFACT phase: container image to scan, as either a digest-qualified ECR reference (<ecr-uri>@sha256:<64-hex>) or a bare sha256:<64-hex> digest. Digest-addressed only — tags are not accepted, so the scanned bytes are the deployed bytes.
42
+ */
43
+ imageDigest?: string;
44
+ bundleRef?: S3Ref;
45
+ /**
46
+ * ARTIFACT phase: S3 locations of synthesized infrastructure documents (e.g. CloudFormation templates) evaluated by policy (OPA/rego) checks.
47
+ *
48
+ * @minItems 1
49
+ */
50
+ infraRefs?: S3Ref1[];
51
+ /**
52
+ * Optional build-source provenance for ARTIFACT calls where the top-level repo/commit describe the source of the build rather than the artifact itself; stamped into verdict provenance verbatim.
53
+ */
54
+ provenance?: {
55
+ /**
56
+ * GitHub owner/name of the build-source repository.
57
+ */
58
+ repo: string;
59
+ /**
60
+ * Full 40-hex lowercase commit SHA the artifact was built from.
61
+ */
62
+ commit: string;
63
+ /**
64
+ * Branch the artifact was built from, caller-supplied provenance.
65
+ */
66
+ branch?: string;
67
+ };
68
+ }
69
+ /**
70
+ * ARTIFACT phase: S3 location of the built deployable bundle to scan.
71
+ */
72
+ export interface S3Ref {
73
+ /**
74
+ * S3 bucket name.
75
+ */
76
+ bucket: string;
77
+ /**
78
+ * S3 object key.
79
+ */
80
+ key: string;
81
+ }
82
+ export interface S3Ref1 {
83
+ /**
84
+ * S3 bucket name.
85
+ */
86
+ bucket: string;
87
+ /**
88
+ * S3 object key.
89
+ */
90
+ key: string;
40
91
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fourier-labs/harbour-contracts",
3
- "version": "0.29.0",
3
+ "version": "0.30.0",
4
4
  "description": "Single source of truth for every data shape that crosses a boundary between Harbour components.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -2,15 +2,23 @@
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "https://schemas.harbour.dev/security-scan-input.schema.json",
4
4
  "title": "SecurityScanInput",
5
- "description": "Input to the Harbour Security Assurance machine (Security Assurance LLD §2). M1 runs the SOURCE phase only; ARTIFACT is reserved in the enum so the contract is stable through M2. `commit` is the identity being scanned; `org/app/env` locate the snapshot (the control-state table has no commit GSI, so a bare commit is not resolvable); `branch` is caller-supplied provenance.",
5
+ "description": "Input to the Harbour Security Assurance machine (Security Assurance LLD §2). SOURCE (M1) scans an ingested commit; ARTIFACT (M2) scans built outputs — a container image digest, a deployable bundle, and/or synthesized infrastructure — named directly by the caller. `commit` is the identity being scanned; `org/app/env` locate the snapshot (the control-state table has no commit GSI, so a bare commit is not resolvable); `branch` is caller-supplied provenance. When phase is ARTIFACT at least one of `imageDigest`, `bundleRef`, or `infraRefs` must be present.",
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
8
  "required": ["phase", "org", "app", "env", "repo", "commit", "branch"],
9
+ "if": { "properties": { "phase": { "const": "ARTIFACT" } }, "required": ["phase"] },
10
+ "then": {
11
+ "anyOf": [
12
+ { "required": ["imageDigest"] },
13
+ { "required": ["bundleRef"] },
14
+ { "required": ["infraRefs"] }
15
+ ]
16
+ },
9
17
  "properties": {
10
18
  "phase": {
11
19
  "type": "string",
12
20
  "enum": ["SOURCE", "ARTIFACT"],
13
- "description": "Scan phase. M1 implements SOURCE only; ARTIFACT is reserved for M2 (image scan against an ECR digest) and is rejected by the machine until then."
21
+ "description": "Scan phase. SOURCE (M1) scans the ingested snapshot for the commit; ARTIFACT (M2) scans built outputs named by imageDigest/bundleRef/infraRefs — at least one of which must be present."
14
22
  },
15
23
  "org": {
16
24
  "type": "string",
@@ -47,6 +55,56 @@
47
55
  "type": "string",
48
56
  "enum": ["GREEN", "YELLOW", "ORANGE", "RED"],
49
57
  "description": "Data classification of the app. Optional in v1 (decided 2026-08-27): when ABSENT the machine assumes the STANDARD profile and stamps classificationDefaulted: true in the verdict provenance. An invalid value still fails closed — only absence defaults. No classifier exists until M4; until then callers state it or accept the default."
58
+ },
59
+ "imageDigest": {
60
+ "type": "string",
61
+ "pattern": "^([^@\\s]+@)?sha256:[0-9a-f]{64}$",
62
+ "description": "ARTIFACT phase: container image to scan, as either a digest-qualified ECR reference (<ecr-uri>@sha256:<64-hex>) or a bare sha256:<64-hex> digest. Digest-addressed only — tags are not accepted, so the scanned bytes are the deployed bytes."
63
+ },
64
+ "bundleRef": {
65
+ "$ref": "#/definitions/S3Ref",
66
+ "description": "ARTIFACT phase: S3 location of the built deployable bundle to scan."
67
+ },
68
+ "infraRefs": {
69
+ "type": "array",
70
+ "items": { "$ref": "#/definitions/S3Ref" },
71
+ "minItems": 1,
72
+ "description": "ARTIFACT phase: S3 locations of synthesized infrastructure documents (e.g. CloudFormation templates) evaluated by policy (OPA/rego) checks."
73
+ },
74
+ "provenance": {
75
+ "type": "object",
76
+ "additionalProperties": false,
77
+ "required": ["repo", "commit"],
78
+ "properties": {
79
+ "repo": {
80
+ "type": "string",
81
+ "minLength": 1,
82
+ "pattern": "^[^/\\s]+/[^/\\s]+$",
83
+ "description": "GitHub owner/name of the build-source repository."
84
+ },
85
+ "commit": {
86
+ "type": "string",
87
+ "pattern": "^[0-9a-f]{40}$",
88
+ "description": "Full 40-hex lowercase commit SHA the artifact was built from."
89
+ },
90
+ "branch": {
91
+ "type": "string",
92
+ "minLength": 1,
93
+ "description": "Branch the artifact was built from, caller-supplied provenance."
94
+ }
95
+ },
96
+ "description": "Optional build-source provenance for ARTIFACT calls where the top-level repo/commit describe the source of the build rather than the artifact itself; stamped into verdict provenance verbatim."
97
+ }
98
+ },
99
+ "definitions": {
100
+ "S3Ref": {
101
+ "type": "object",
102
+ "additionalProperties": false,
103
+ "required": ["bucket", "key"],
104
+ "properties": {
105
+ "bucket": { "type": "string", "minLength": 1, "description": "S3 bucket name." },
106
+ "key": { "type": "string", "minLength": 1, "description": "S3 object key." }
107
+ }
50
108
  }
51
109
  }
52
110
  }