@intentius/chant-lexicon-docker 0.57.0 → 0.59.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/integrity.json +2 -2
- package/dist/lint/audit-catalog.d.ts.map +1 -1
- package/dist/lint/audit-lineage.d.ts +10 -0
- package/dist/lint/audit-lineage.d.ts.map +1 -0
- package/dist/manifest.json +1 -1
- package/package.json +2 -2
- package/src/lint/audit-catalog.ts +5 -1
- package/src/lint/audit-lineage.ts +34 -0
package/dist/integrity.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
4
|
+
"manifest.json": "c78b187acb14b2a51ca815402546a0d4c8a57b0e89592f687deda58c8c4e7e0f",
|
|
5
5
|
"meta.json": "ae27dc809e705d37a645ee83b9789c50051282f7891d21d6b9e6ce8d111624ff",
|
|
6
6
|
"types/index.d.ts": "758f989ff86af54284d7f841a2db2259038d51ce1f3ed839a5d8e83fa20d95b8",
|
|
7
7
|
"rules/no-latest-tag.ts": "efd060453d8ca3d5b85c3972906c6650b6f63eb5f67cb6cdb0f16a41cad91228",
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
"skills/chant-docker.md": "3ff0708e3c76e245f202948949c768464563af2b60cc9aa2ca52f494ef8357f1",
|
|
16
16
|
"skills/chant-docker-patterns.md": "ad1b0196d8150b2df579a699ff107f604340c799c04f3460ebf65003e287b12a"
|
|
17
17
|
},
|
|
18
|
-
"composite": "
|
|
18
|
+
"composite": "102ceb56c06e72263fbe4d7519db4a84fac12ec341c4254ff3d0536b9c0fb66a"
|
|
19
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-catalog.d.ts","sourceRoot":"","sources":["../../src/lint/audit-catalog.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAA+B,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"file":"audit-catalog.d.ts","sourceRoot":"","sources":["../../src/lint/audit-catalog.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAA+B,KAAK,QAAQ,EAAgC,MAAM,gCAAgC,CAAC;AAK1H,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAOvD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prior art for these audit rules: the open-source tools whose checks cover the
|
|
3
|
+
* same condition, credited per rule. See packages/core/src/audit/prior-art.ts for
|
|
4
|
+
* the registry, the relation vocabulary, and why this is credit rather than
|
|
5
|
+
* authority. Kept by hand; the prior-art sweep (scripts/prior-art-sweep.ts) reports
|
|
6
|
+
* when a credited tool's index no longer lists a rule cited here.
|
|
7
|
+
*/
|
|
8
|
+
import type { Lineage } from "@intentius/chant/audit/catalog";
|
|
9
|
+
export declare const dockerAuditLineage: Record<string, Lineage[]>;
|
|
10
|
+
//# sourceMappingURL=audit-lineage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-lineage.d.ts","sourceRoot":"","sources":["../../src/lint/audit-lineage.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAE9D,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CAwBxD,CAAC"}
|
package/dist/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant-lexicon-docker",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.59.0",
|
|
4
4
|
"description": "Docker lexicon for chant — declarative IaC in TypeScript",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://intentius.io/chant",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"typescript": "^5.9.3"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"@intentius/chant": "^0.
|
|
70
|
+
"@intentius/chant": "^0.59.0",
|
|
71
71
|
"typescript": "^5.9.3"
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* The docker lexicon's `chant audit` catalog — metadata for the DKRD*
|
|
3
3
|
* Dockerfile/Compose post-synth rules. Contributed via `dockerPlugin.auditCatalog()` (#687).
|
|
4
4
|
*/
|
|
5
|
-
import { auditRule, SCORECARD_PINNED, type RuleMeta, type Authority } from "@intentius/chant/audit/catalog";
|
|
5
|
+
import { auditRule, SCORECARD_PINNED, type RuleMeta, type Authority, applyLineage } from "@intentius/chant/audit/catalog";
|
|
6
|
+
import { dockerAuditLineage } from "./audit-lineage";
|
|
6
7
|
|
|
7
8
|
const DOCKER_SEC: Authority = { name: "Docker — Security best practices", url: "https://docs.docker.com/develop/security-best-practices/" };
|
|
8
9
|
|
|
@@ -14,3 +15,6 @@ export const dockerAuditCatalog: Record<string, RuleMeta> = {
|
|
|
14
15
|
DKRD011: auditRule("DKRD011", "report-only", "guidance", "ADD used where COPY would do", "Prefer COPY unless fetching a URL or extracting an archive.", { category: "best-practice" }),
|
|
15
16
|
DKRD012: auditRule("DKRD012", "merge-worthy", "guidance", "No USER instruction — container runs as root", "Add a non-root USER instruction.", { authority: [DOCKER_SEC] }),
|
|
16
17
|
};
|
|
18
|
+
|
|
19
|
+
// Prior art credits live beside the rules in ./audit-lineage.ts (see core audit/prior-art.ts).
|
|
20
|
+
applyLineage(dockerAuditCatalog, dockerAuditLineage);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prior art for these audit rules: the open-source tools whose checks cover the
|
|
3
|
+
* same condition, credited per rule. See packages/core/src/audit/prior-art.ts for
|
|
4
|
+
* the registry, the relation vocabulary, and why this is credit rather than
|
|
5
|
+
* authority. Kept by hand; the prior-art sweep (scripts/prior-art-sweep.ts) reports
|
|
6
|
+
* when a credited tool's index no longer lists a rule cited here.
|
|
7
|
+
*/
|
|
8
|
+
import type { Lineage } from "@intentius/chant/audit/catalog";
|
|
9
|
+
|
|
10
|
+
export const dockerAuditLineage: Record<string, Lineage[]> = {
|
|
11
|
+
DKRD001: [
|
|
12
|
+
{ tool: "hadolint", rule: "DL3007", url: "https://github.com/hadolint/hadolint/wiki/DL3007", relation: "overlaps" },
|
|
13
|
+
{ tool: "checkov", rule: "CKV_DOCKER_7", url: "https://www.checkov.io/5.Policy%20Index/dockerfile.html", relation: "overlaps" },
|
|
14
|
+
{ tool: "kics", rule: "image_version_using_latest", url: "https://docs.kics.io/latest/queries/dockerfile-queries/f45ea400-6bbe-4501-9fc7-1c3d75c32067/", relation: "overlaps" },
|
|
15
|
+
],
|
|
16
|
+
DKRD003: [
|
|
17
|
+
{ tool: "checkov", rule: "CKV_DOCKER_1", url: "https://www.checkov.io/5.Policy%20Index/dockerfile.html", relation: "overlaps" },
|
|
18
|
+
{ tool: "kics", rule: "Exposing Port 22 (SSH)", url: "https://docs.kics.io/latest/queries/dockerfile-queries/5907595b-5b6d-4142-b173-dbb0e73fbff8/", relation: "overlaps" },
|
|
19
|
+
],
|
|
20
|
+
DKRD010: [
|
|
21
|
+
{ tool: "hadolint", rule: "DL3015", url: "https://github.com/hadolint/hadolint/wiki/DL3015", relation: "equivalent" },
|
|
22
|
+
{ tool: "kics", rule: "apt_get_not_avoiding_additional_packages", url: "https://docs.kics.io/latest/queries/dockerfile-queries/7384dfb2-fcd1-4fbf-91cd-6c44c318c33c/", relation: "equivalent" },
|
|
23
|
+
],
|
|
24
|
+
DKRD011: [
|
|
25
|
+
{ tool: "hadolint", rule: "DL3020", url: "https://github.com/hadolint/hadolint/wiki/DL3020", relation: "equivalent" },
|
|
26
|
+
{ tool: "checkov", rule: "CKV_DOCKER_4", url: "https://www.checkov.io/5.Policy%20Index/dockerfile.html", relation: "overlaps" },
|
|
27
|
+
{ tool: "dockle", rule: "CIS-DI-0009", url: "https://github.com/goodwithtech/dockle/blob/master/CHECKPOINT.md#cis-di-0009", relation: "overlaps" },
|
|
28
|
+
],
|
|
29
|
+
DKRD012: [
|
|
30
|
+
{ tool: "checkov", rule: "CKV_DOCKER_3", url: "https://www.checkov.io/5.Policy%20Index/dockerfile.html", relation: "equivalent" },
|
|
31
|
+
{ tool: "kics", rule: "missing_user_instruction", url: "https://docs.kics.io/latest/queries/dockerfile-queries/fd54f200-402c-4333-a5a4-36ef6709af2f/", relation: "equivalent" },
|
|
32
|
+
{ tool: "dockle", rule: "CIS-DI-0001", url: "https://github.com/goodwithtech/dockle/blob/master/CHECKPOINT.md#cis-di-0001", relation: "overlaps" },
|
|
33
|
+
],
|
|
34
|
+
};
|