@cclabsnz/sf-audit 1.27.0 → 1.28.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/CHANGELOG.md +39 -0
- package/README.md +1 -1
- package/lib/checks/CheckEngine.js +2 -3
- package/lib/compliance/catalogs/hiso10029.d.ts +2 -1
- package/lib/compliance/catalogs/hiso10029.js +23 -34
- package/lib/compliance/catalogs/index.js +3 -2
- package/lib/compliance/catalogs/nzism.js +19 -30
- package/lib/compliance/mapping.d.ts +13 -0
- package/lib/compliance/mapping.js +45 -13
- package/lib/compliance/nz/citations.generated.d.ts +45 -0
- package/lib/compliance/nz/citations.generated.js +4752 -0
- package/lib/compliance/nz/types.d.ts +21 -0
- package/lib/compliance/nz/types.js +2 -0
- package/lib/compliance/resolve.js +11 -6
- package/lib/compliance/types.d.ts +1 -1
- package/lib/renderers/ClientReportRenderer.js +1 -1
- package/lib/report/ComplianceMatrix.js +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,45 @@ published note and carries the signed provenance attestation and CycloneDX SBOM
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [v1.28.0](https://github.com/cclabsnz/sf-audit-plugin/releases/tag/v1.28.0) — 2026-11-17
|
|
13
|
+
|
|
14
|
+
HISO 10029 and NZISM citations are now per check, at requirement and section level, and each one
|
|
15
|
+
says where it came from. No check, finding, severity or score changes. Compliance control ids for
|
|
16
|
+
HISO and NZISM change, so anything that reads them from JSON or SARIF output needs updating.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- **HISO 10029 cites published requirements.** The eight HISO "domains" (`HISO-AC`, `HISO-AUTH`
|
|
21
|
+
and so on), which sf-audit made up and applied to every check in a domain, are replaced by the
|
|
22
|
+
requirements themselves: HISO 10029.4:2025 supplier requirements (`HISO-HSUP34`) and their
|
|
23
|
+
HISO 10029.3:2023 equivalents for medium to large health organisations (`HISO-HML39`), each with
|
|
24
|
+
its statement quoted from the published PDF. The old catalogue also called HISO 10029 ISO
|
|
25
|
+
27002-based; it is built on the NIST Cybersecurity Framework.
|
|
26
|
+
- **Two HISO frameworks.** `HISO10029` is split into `HISO10029_3` (providers) and `HISO10029_4`
|
|
27
|
+
(suppliers), because which part applies depends on who owns the org. `--frameworks hiso` and the
|
|
28
|
+
`nz` pack select both; `hiso-provider` and `hiso-supplier` select one.
|
|
29
|
+
- **NZISM cites sections, with their controls.** The seven chapter-level NZISM controls are
|
|
30
|
+
replaced by NZISM v3.9 sections (`NZISM-16.7`), each listing the controls it covers and their
|
|
31
|
+
MUST or SHOULD level.
|
|
32
|
+
- **Every citation records its basis.** A citation tagged `scf` comes from the Secure Controls
|
|
33
|
+
Framework 2026.3 crosswalk: each check is mapped to the SCF controls a failing finding evidences,
|
|
34
|
+
and SCF's HISO and NZISM columns give the requirements. A citation tagged `direct` is sf-audit's
|
|
35
|
+
own judgement and carries its reason. Where SCF derives a requirement that does not fit a check,
|
|
36
|
+
the exclusion and its reason are recorded. Every decision is listed in
|
|
37
|
+
`docs/compliance/nz-crosswalk.md`, the rules are in `spec/nz-compliance-crosswalk.md`, and a test
|
|
38
|
+
checks every cited id against the pinned sources.
|
|
39
|
+
- **HISO and NZISM citations attach per finding.** They attach only to active findings (never to an
|
|
40
|
+
INFO, passed or inconclusive one), and a
|
|
41
|
+
citation that only one of a check's findings supports is scoped to that finding. The compliance
|
|
42
|
+
matrix now counts each finding against its own tags; for every other framework those are the
|
|
43
|
+
check's tags, so OWASP, SOC 2, ISO 27001, SBS, Privacy Act, HIPAA and GDPR rows are unchanged.
|
|
44
|
+
- **Most Agentforce and GenAI checks now carry HISO and NZISM citations**, applying the general
|
|
45
|
+
access, privileged-access and development requirements to the agent user. They had none.
|
|
46
|
+
`agent-action-surface` and `agent-monitoring-coverage` still carry none, because what they
|
|
47
|
+
measure is not evidence that a requirement is unmet.
|
|
48
|
+
- **HISO citation links** point to the two published PDFs; the old link redirected to the Health NZ
|
|
49
|
+
homepage.
|
|
50
|
+
|
|
12
51
|
## [v1.27.0](https://github.com/cclabsnz/sf-audit-plugin/releases/tag/v1.27.0) — 2026-11-11
|
|
13
52
|
|
|
14
53
|
sf-audit is now easier for an AI agent to drive. `--summary` returns page one of the report as
|
package/README.md
CHANGED
|
@@ -179,7 +179,7 @@ advisories are INFO and never inflate the health score.
|
|
|
179
179
|
## Compliance frameworks
|
|
180
180
|
|
|
181
181
|
Findings map to controls across 10 frameworks organized into 8 source-verified general baselines and 2 specialized jurisdictional packs:
|
|
182
|
-
- **8 General Baselines:** OWASP Top 10 (2021), OWASP LLM Top 10 (2025), SOC 2 (2017 TSC), ISO/IEC 27001:2022, Security Benchmark for Salesforce (SBS), New Zealand Privacy Act 2020, HISO 10029:
|
|
182
|
+
- **8 General Baselines:** OWASP Top 10 (2021), OWASP LLM Top 10 (2025), SOC 2 (2017 TSC), ISO/IEC 27001:2022, Security Benchmark for Salesforce (SBS), New Zealand Privacy Act 2020, HISO 10029 (10029.3:2023 for health organisations and 10029.4:2025 for suppliers, cited per requirement), and NZISM (v3.9, cited per section).
|
|
183
183
|
- **2 Jurisdictional Packs:** HIPAA Security Rule (45 CFR Part 164 Subpart C) and GDPR (Regulation (EU) 2016/679).
|
|
184
184
|
|
|
185
185
|
The mapping is built on a **sourced catalog** — each control carries its framework, pinned version,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { buildAuditResult } from '../findings/scoring.js';
|
|
2
|
-
import {
|
|
2
|
+
import { complianceTagsForFinding } from '../compliance/mapping.js';
|
|
3
3
|
import { threatsFor, withAttack } from '../threats/resolve.js';
|
|
4
4
|
import { ChainEngine } from '../chains/ChainEngine.js';
|
|
5
5
|
import { applyWaivers } from '../waivers/applyWaivers.js';
|
|
@@ -93,9 +93,8 @@ export class CheckEngine {
|
|
|
93
93
|
onProgress?.(i + 1, total, check.name);
|
|
94
94
|
try {
|
|
95
95
|
const result = await check.run(this.ctx);
|
|
96
|
-
const tags = getComplianceTags(check.id);
|
|
97
96
|
findings.push(...result.findings.map((f) => ({
|
|
98
|
-
...f, checkId: check.id, complianceTags:
|
|
97
|
+
...f, checkId: check.id, complianceTags: complianceTagsForFinding(check.id, f), threats: withAttack(f, threatsFor(check.id, f.threats)),
|
|
99
98
|
})));
|
|
100
99
|
if (result.metrics) {
|
|
101
100
|
metrics = { ...metrics, ...result.metrics };
|
|
@@ -1,35 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
requirement:
|
|
18
|
-
sourceRef:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
sourceRef: ref('Information Classification'), url: URL, verified: true },
|
|
25
|
-
{ id: 'HISO-DEV', framework: 'HISO10029', version: V, title: 'Secure development and change',
|
|
26
|
-
requirement: 'Application code and changes follow secure development practices that prevent introduction of vulnerabilities affecting health information.',
|
|
27
|
-
sourceRef: ref('Secure Development'), url: URL, verified: true },
|
|
28
|
-
{ id: 'HISO-COMM', framework: 'HISO10029', version: V, title: 'Communications and integration security',
|
|
29
|
-
requirement: 'Integrations and external communications carrying health information use secure, controlled, and authorised channels.',
|
|
30
|
-
sourceRef: ref('Communications Security'), url: URL, verified: true },
|
|
31
|
-
{ id: 'HISO-GOV', framework: 'HISO10029', version: V, title: 'Security configuration and governance',
|
|
32
|
-
requirement: 'Systems holding health information are securely configured, kept current, and governed against a defined security baseline.',
|
|
33
|
-
sourceRef: ref('Security Governance'), url: URL, verified: true },
|
|
34
|
-
];
|
|
1
|
+
import { CHECK_NZ_CITATIONS, HISO_SOURCES, HML_REQUIREMENTS, HSUP_REQUIREMENTS, } from '../nz/citations.generated.js';
|
|
2
|
+
// HISO 10029 Health Information Security Framework (HISF), Health NZ | Te Whatu Ora. HISF is built
|
|
3
|
+
// on the NIST Cybersecurity Framework (core document s3); ISO/IEC 27002 is one of the catalogues it
|
|
4
|
+
// maps to. Two parts are cited, because which applies depends on who owns the org:
|
|
5
|
+
// HISO 10029.3:2023, medium to large health organisations (HML requirements)
|
|
6
|
+
// HISO 10029.4:2025, suppliers to the health sector (HSUP requirements)
|
|
7
|
+
// Each control is one published requirement, with its statement taken verbatim from the PDF
|
|
8
|
+
// (CC BY 4.0). Which checks cite it comes from scripts/compliance/derive_nz_citations.py.
|
|
9
|
+
// `verified` = the requirement id and statement exist in the pinned PDF, which
|
|
10
|
+
// test/unit/compliance/nzCrosswalk.test.ts checks against data/compliance/nz-sources.json.
|
|
11
|
+
const cited = (key) => new Set(Object.values(CHECK_NZ_CITATIONS).flatMap((c) => c[key].map((x) => (typeof x === 'string' ? x : x.id))));
|
|
12
|
+
function build(framework, part, version, reqs, ids) {
|
|
13
|
+
return Object.entries(reqs)
|
|
14
|
+
.filter(([id]) => ids.has(id))
|
|
15
|
+
.map(([id, r]) => ({
|
|
16
|
+
id: `HISO-${id}`, framework, version, title: `${id} ${r.area}`,
|
|
17
|
+
requirement: r.statement,
|
|
18
|
+
sourceRef: `${version}, ${id} (${r.area})`,
|
|
19
|
+
url: HISO_SOURCES[part].url, verified: true,
|
|
20
|
+
}));
|
|
21
|
+
}
|
|
22
|
+
export const HISO10029_3_CONTROLS = build('HISO10029_3', 'hiso3', 'HISO 10029.3:2023', HML_REQUIREMENTS, cited('hml'));
|
|
23
|
+
export const HISO10029_4_CONTROLS = build('HISO10029_4', 'hiso4', 'HISO 10029.4:2025', HSUP_REQUIREMENTS, cited('hsup'));
|
|
35
24
|
//# sourceMappingURL=hiso10029.js.map
|
|
@@ -4,7 +4,7 @@ import { SOC2_CONTROLS } from './soc2.js';
|
|
|
4
4
|
import { ISO27001_CONTROLS } from './iso27001.js';
|
|
5
5
|
import { SBS_CONTROLS } from './sbs.js';
|
|
6
6
|
import { PRIVACY_ACT_CONTROLS } from './privacyAct.js';
|
|
7
|
-
import {
|
|
7
|
+
import { HISO10029_3_CONTROLS, HISO10029_4_CONTROLS } from './hiso10029.js';
|
|
8
8
|
import { NZISM_CONTROLS } from './nzism.js';
|
|
9
9
|
import { HIPAA_CONTROLS } from './hipaa.js';
|
|
10
10
|
import { GDPR_CONTROLS } from './gdpr.js';
|
|
@@ -15,7 +15,8 @@ export const ALL_CONTROLS = [
|
|
|
15
15
|
...ISO27001_CONTROLS,
|
|
16
16
|
...SBS_CONTROLS,
|
|
17
17
|
...PRIVACY_ACT_CONTROLS,
|
|
18
|
-
...
|
|
18
|
+
...HISO10029_3_CONTROLS,
|
|
19
|
+
...HISO10029_4_CONTROLS,
|
|
19
20
|
...NZISM_CONTROLS,
|
|
20
21
|
...HIPAA_CONTROLS,
|
|
21
22
|
...GDPR_CONTROLS,
|
|
@@ -1,31 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
sourceRef: 'NZISM v3.8, Ch.17 Cryptography', url: URL, verified: true },
|
|
21
|
-
{ id: 'NZISM-SW', framework: 'NZISM', version: V, title: 'Software and application security',
|
|
22
|
-
requirement: 'Applications are developed and configured securely, mitigating common code-level vulnerabilities and unsafe execution.',
|
|
23
|
-
sourceRef: 'NZISM v3.8, Ch.14 Software Security', url: URL, verified: true },
|
|
24
|
-
{ id: 'NZISM-NET', framework: 'NZISM', version: V, title: 'Network security and gateways',
|
|
25
|
-
requirement: 'Network connections, gateways, and external integrations are restricted to authorised, secured endpoints.',
|
|
26
|
-
sourceRef: 'NZISM v3.8, Ch.18 Network Security / Ch.19 Gateway Security', url: URL, verified: true },
|
|
27
|
-
{ id: 'NZISM-CONFIG', framework: 'NZISM', version: V, title: 'System hardening and configuration',
|
|
28
|
-
requirement: 'Systems are hardened to a secure baseline, kept current with security updates, and unnecessary functionality is disabled.',
|
|
29
|
-
sourceRef: 'NZISM v3.8, Ch.12 Product Security (configuration and patching)', url: URL, verified: true },
|
|
30
|
-
];
|
|
1
|
+
import { NZISM_SECTIONS, NZISM_SOURCE } from '../nz/citations.generated.js';
|
|
2
|
+
// New Zealand Information Security Manual (NZISM), GCSB/NCSC. Section-level controls: each one is
|
|
3
|
+
// an NZISM section (e.g. 16.7 Multi-Factor Authentication) that at least one check cites, and its
|
|
4
|
+
// citation lists the individual controls cited there (from the Secure Controls Framework 2026.3
|
|
5
|
+
// crosswalk, or added directly by sf-audit with a reason),
|
|
6
|
+
// with each control's compliance level from the manual. Which checks cite a section comes from
|
|
7
|
+
// scripts/compliance/derive_nz_citations.py. `verified` = the section and every listed control
|
|
8
|
+
// exist in the pinned manual version, which test/unit/compliance/nzCrosswalk.test.ts checks.
|
|
9
|
+
const V = `NZISM v${NZISM_SOURCE.version}`;
|
|
10
|
+
const level = (l) => l.toUpperCase();
|
|
11
|
+
export const NZISM_CONTROLS = Object.entries(NZISM_SECTIONS).map(([section, s]) => ({
|
|
12
|
+
id: `NZISM-${section}`, framework: 'NZISM', version: V, title: `${section} ${s.title}`,
|
|
13
|
+
requirement: s.controls.length
|
|
14
|
+
? `Controls in section ${section} cited by the checks that cite it (from the SCF crosswalk, or added directly by sf-audit): `
|
|
15
|
+
+ s.controls.map((c) => `${c.id} (${level(c.level)})`).join(', ')
|
|
16
|
+
: `Section ${section} as a whole (cited directly by sf-audit; no SCF crosswalk entry).`,
|
|
17
|
+
sourceRef: `${V}, ${section} ${s.title}`,
|
|
18
|
+
url: NZISM_SOURCE.url, verified: true,
|
|
19
|
+
}));
|
|
31
20
|
//# sourceMappingURL=nzism.js.map
|
|
@@ -1,2 +1,15 @@
|
|
|
1
|
+
interface FindingRef {
|
|
2
|
+
id: string;
|
|
3
|
+
riskLevel: string;
|
|
4
|
+
passed?: boolean;
|
|
5
|
+
inconclusive?: boolean;
|
|
6
|
+
}
|
|
1
7
|
export declare const CHECK_CONTROL_MAP: Record<string, string[]>;
|
|
8
|
+
/**
|
|
9
|
+
* The control ids one finding carries. Every framework but HISO 10029 and NZISM maps at check level,
|
|
10
|
+
* so those ids are the check's. HISO and NZISM citations attach only to active findings (not INFO, passed
|
|
11
|
+
* or inconclusive), and only to the findings a scoped citation names (spec/nz-compliance-crosswalk.md, RULE-127).
|
|
12
|
+
*/
|
|
13
|
+
export declare function complianceTagsForFinding(checkId: string, finding: FindingRef): string[];
|
|
14
|
+
export {};
|
|
2
15
|
//# sourceMappingURL=mapping.d.ts.map
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { CHECK_NZ_CITATIONS } from './nz/citations.generated.js';
|
|
1
2
|
// Maps each check id to the compliance control ids it relates to.
|
|
2
3
|
// Migrated from the former ComplianceMapping. A08/A10 are mapped precisely:
|
|
3
4
|
// A10 (SSRF) → egress controls (remote-sites, csp-trusted-sites, named-credentials)
|
|
4
5
|
// A08 (Software & Data Integrity) → installed-packages, deployment-identity
|
|
5
|
-
// NZ
|
|
6
|
+
// NZ Privacy Act ids are layered on by domain via NZ_CROSSWALK below; HISO 10029 and NZISM ids come
|
|
7
|
+
// per check from the generated crosswalk, and attach per finding (see complianceTagsForFinding).
|
|
6
8
|
const BASE_CHECK_CONTROL_MAP = {
|
|
7
9
|
'users-and-admins': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.5.18', 'SBS-ACS-004'],
|
|
8
10
|
'permissions': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.5.18', 'SBS-ACS-002', 'SBS-ACS-005'],
|
|
@@ -162,25 +164,44 @@ const DOMAIN = {
|
|
|
162
164
|
configGovernance: ['health-check', 'api-limits', 'release-updates', 'legacy-api-version', 'installed-packages', 'deployment-identity', 'session-hardening',
|
|
163
165
|
'package-post-install-supply-chain'],
|
|
164
166
|
accountLifecycle: ['inactive-users'],
|
|
165
|
-
// Agentforce / GenAI. The
|
|
166
|
-
//
|
|
167
|
-
//
|
|
167
|
+
// Agentforce / GenAI. The Privacy Act domain crosswalk does not cover these; HIPAA and GDPR do, because
|
|
168
|
+
// an over-privileged agent user reading PHI or personal data is squarely an access-control and
|
|
169
|
+
// security-of-processing question. HISO 10029 and NZISM cite them per check from the generated
|
|
170
|
+
// crosswalk, applying the general access, logging and development requirements to the agent user.
|
|
168
171
|
aiAgents: ['agent-inventory', 'agent-user-privilege', 'agent-action-surface', 'agent-channel-exposure',
|
|
169
172
|
'agent-monitoring-coverage', 'trusted-url-hygiene', 'agent-query-reach', 'agent-outbound-actions',
|
|
170
173
|
'genai-prompt-template-grounding'],
|
|
171
174
|
};
|
|
172
|
-
// NZ
|
|
175
|
+
// NZ Privacy Act: IPPs are statute-level, so they are layered on by domain. (SCF's Privacy Act
|
|
176
|
+
// column maps Part 6 breach notification sections, not the IPPs, so it is not used here.)
|
|
173
177
|
const NZ_CROSSWALK = [
|
|
174
|
-
{ controls: ['
|
|
175
|
-
{ controls: ['
|
|
176
|
-
{ controls: ['HISO-CRYPTO', 'NZISM-CRYPTO', 'PRIVACY-IPP5'], checks: DOMAIN.crypto },
|
|
177
|
-
{ controls: ['HISO-LOG', 'NZISM-LOG'], checks: DOMAIN.logging },
|
|
178
|
-
{ controls: ['HISO-DEV', 'NZISM-SW'], checks: DOMAIN.devSecurity },
|
|
179
|
-
{ controls: ['HISO-COMM', 'NZISM-NET', 'PRIVACY-IPP12'], checks: DOMAIN.network },
|
|
180
|
-
{ controls: ['HISO-DATA', 'PRIVACY-IPP5'], checks: DOMAIN.dataGovernance },
|
|
181
|
-
{ controls: ['HISO-GOV', 'NZISM-CONFIG'], checks: DOMAIN.configGovernance },
|
|
178
|
+
{ controls: ['PRIVACY-IPP5'], checks: [...DOMAIN.accessControl, ...DOMAIN.authentication, ...DOMAIN.crypto, ...DOMAIN.dataGovernance] },
|
|
179
|
+
{ controls: ['PRIVACY-IPP12'], checks: DOMAIN.network },
|
|
182
180
|
{ controls: ['PRIVACY-IPP9'], checks: DOMAIN.accountLifecycle },
|
|
183
181
|
];
|
|
182
|
+
const isNzId = (id) => id.startsWith('HISO-') || id.startsWith('NZISM-');
|
|
183
|
+
// A scope entry names one finding id exactly; one ending in '-' names every id it prefixes (for ids
|
|
184
|
+
// built from a template, such as `trusted-url-hygiene-parked-${domain}`). Exact by default, so
|
|
185
|
+
// `permissions-api-enabled` does not also match the passed `permissions-api-enabled-ok`.
|
|
186
|
+
const inScope = (id, p) => (p.endsWith('-') ? id.startsWith(p) : id === p);
|
|
187
|
+
function appliesTo(findings, finding) {
|
|
188
|
+
if (!finding)
|
|
189
|
+
return true;
|
|
190
|
+
if (finding.riskLevel === 'INFO' || finding.passed || finding.inconclusive)
|
|
191
|
+
return false;
|
|
192
|
+
return !findings || findings.some((p) => inScope(finding.id, p));
|
|
193
|
+
}
|
|
194
|
+
function nzCitationIds(check, finding) {
|
|
195
|
+
const c = CHECK_NZ_CITATIONS[check];
|
|
196
|
+
if (!c)
|
|
197
|
+
return [];
|
|
198
|
+
const hsup = c.hsup.map((h, i) => ({ h, hml: c.hml[i] })).filter(({ h }) => appliesTo(h.findings, finding));
|
|
199
|
+
return [
|
|
200
|
+
...hsup.map(({ h }) => `HISO-${h.id}`),
|
|
201
|
+
...hsup.map(({ hml }) => `HISO-${hml}`),
|
|
202
|
+
...c.nzism.filter((n) => appliesTo(n.findings, finding)).map((n) => `NZISM-${n.section}`),
|
|
203
|
+
];
|
|
204
|
+
}
|
|
184
205
|
// HIPAA / GDPR crosswalk — the domain-wide obligations. Anything narrower than a whole domain is
|
|
185
206
|
// mapped per check in REGULATORY_PRECISE below rather than swept across the domain, because these
|
|
186
207
|
// ids name a specific implementation specification or article paragraph: claiming "automatic
|
|
@@ -253,6 +274,8 @@ function buildCheckControlMap() {
|
|
|
253
274
|
for (const [check, ids] of Object.entries(REGULATORY_PRECISE)) {
|
|
254
275
|
(map[check] ??= []).push(...ids);
|
|
255
276
|
}
|
|
277
|
+
for (const check of Object.keys(map))
|
|
278
|
+
map[check].push(...nzCitationIds(check));
|
|
256
279
|
// A control can arrive from both a crosswalk and a precise entry; a compliance matrix must not
|
|
257
280
|
// render the same control twice for one check.
|
|
258
281
|
for (const check of Object.keys(map))
|
|
@@ -260,4 +283,13 @@ function buildCheckControlMap() {
|
|
|
260
283
|
return map;
|
|
261
284
|
}
|
|
262
285
|
export const CHECK_CONTROL_MAP = buildCheckControlMap();
|
|
286
|
+
/**
|
|
287
|
+
* The control ids one finding carries. Every framework but HISO 10029 and NZISM maps at check level,
|
|
288
|
+
* so those ids are the check's. HISO and NZISM citations attach only to active findings (not INFO, passed
|
|
289
|
+
* or inconclusive), and only to the findings a scoped citation names (spec/nz-compliance-crosswalk.md, RULE-127).
|
|
290
|
+
*/
|
|
291
|
+
export function complianceTagsForFinding(checkId, finding) {
|
|
292
|
+
const base = (CHECK_CONTROL_MAP[checkId] ?? []).filter((id) => !isNzId(id));
|
|
293
|
+
return [...new Set([...base, ...nzCitationIds(checkId, finding)])];
|
|
294
|
+
}
|
|
263
295
|
//# sourceMappingURL=mapping.js.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { CheckNzCitations } from './types.js';
|
|
2
|
+
export declare const SCF_SOURCE: {
|
|
3
|
+
readonly name: "Secure Controls Framework";
|
|
4
|
+
readonly version: "2026.3";
|
|
5
|
+
readonly url: "https://securecontrolsframework.com";
|
|
6
|
+
readonly commit: "d08211314fc7ccfca8e6c84d2b27a2030339ef9c";
|
|
7
|
+
readonly sha256: "5a89bf2d3c106a9a87d4b6e3d62dd3e147d0e960d4c07473045a10aa8a7df697";
|
|
8
|
+
readonly licence: "CC BY-ND 4.0, SCF Council";
|
|
9
|
+
};
|
|
10
|
+
export declare const HISO_SOURCES: {
|
|
11
|
+
readonly hiso3: {
|
|
12
|
+
readonly title: "HISO 10029.3:2023 Guidance for Medium to Large Organisations";
|
|
13
|
+
readonly url: "https://static.info.content.health.nz/docs/HISO/HISO-10029-3-2023-Health-Information-Security-Framework-Guidance-for-Medium-to-Large-Organisations.pdf";
|
|
14
|
+
readonly sha256: "4352c6cba0593182ce7e69838b236789e990985b6bfbc15f10de80377092f577";
|
|
15
|
+
readonly licence: "CC BY 4.0, Health New Zealand | Te Whatu Ora";
|
|
16
|
+
};
|
|
17
|
+
readonly hiso4: {
|
|
18
|
+
readonly title: "HISO 10029.4:2025 Guidance for Suppliers";
|
|
19
|
+
readonly url: "https://static.info.content.health.nz/docs/HISO/HISO-10029-4-Health-Information-Security-Framework-Guidance-for-Suppliers.pdf";
|
|
20
|
+
readonly sha256: "464e78f2a345986a2110436b1f86bbe2431946e3c89a4acb579ab5618eddb45a";
|
|
21
|
+
readonly licence: "CC BY 4.0, Health New Zealand | Te Whatu Ora";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare const NZISM_SOURCE: {
|
|
25
|
+
readonly version: "3.9";
|
|
26
|
+
readonly url: "https://nzism.gcsb.govt.nz/ism-document";
|
|
27
|
+
};
|
|
28
|
+
export declare const HML_REQUIREMENTS: Record<string, {
|
|
29
|
+
area: string;
|
|
30
|
+
statement: string;
|
|
31
|
+
}>;
|
|
32
|
+
export declare const HSUP_REQUIREMENTS: Record<string, {
|
|
33
|
+
area: string;
|
|
34
|
+
statement: string;
|
|
35
|
+
}>;
|
|
36
|
+
export declare const HSUP_TO_HML: Record<string, string>;
|
|
37
|
+
export declare const NZISM_SECTIONS: Record<string, {
|
|
38
|
+
title: string;
|
|
39
|
+
controls: {
|
|
40
|
+
id: string;
|
|
41
|
+
level: string;
|
|
42
|
+
}[];
|
|
43
|
+
}>;
|
|
44
|
+
export declare const CHECK_NZ_CITATIONS: Record<string, CheckNzCitations>;
|
|
45
|
+
//# sourceMappingURL=citations.generated.d.ts.map
|