@cclabsnz/sf-audit 1.8.2 → 1.10.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 +221 -0
- package/README.md +144 -756
- package/lib/chains/CapabilityRegistry.d.ts +6 -2
- package/lib/chains/CapabilityRegistry.js +48 -2
- package/lib/chains/namedChains.js +140 -7
- package/lib/checks/impl/AgentChannelExposureCheck.js +52 -10
- package/lib/checks/impl/ApexCrudFLSCheck.js +3 -3
- package/lib/checks/impl/ApexRestEndpointCheck.js +0 -3
- package/lib/checks/impl/CustomLabelsCredentialCheck.js +1 -1
- package/lib/checks/impl/DataClassificationCheck.js +15 -1
- package/lib/checks/impl/FailedLoginCheck.js +16 -1
- package/lib/checks/impl/FieldLevelSecurityCheck.js +29 -16
- package/lib/checks/impl/GuestUserVisibilityCheck.d.ts +35 -0
- package/lib/checks/impl/GuestUserVisibilityCheck.js +168 -0
- package/lib/checks/impl/HardcodedCredentialsCheck.js +0 -1
- package/lib/checks/impl/HealthCheckCheck.js +1 -3
- package/lib/checks/impl/IntegrationLeastPrivilegeCheck.d.ts +42 -0
- package/lib/checks/impl/IntegrationLeastPrivilegeCheck.js +467 -0
- package/lib/checks/impl/IntegrationUsersCheck.js +48 -52
- package/lib/checks/impl/InternalUserMfaCheck.js +0 -1
- package/lib/checks/impl/IpRestrictionsCheck.js +39 -5
- package/lib/checks/impl/PublicGroupSharingCheck.js +21 -2
- package/lib/checks/impl/ScheduledApexCheck.js +0 -1
- package/lib/checks/impl/SoapLoginApiAuthCheck.d.ts +10 -0
- package/lib/checks/impl/SoapLoginApiAuthCheck.js +151 -0
- package/lib/checks/impl/SsoEnforcementCheck.js +0 -1
- package/lib/checks/impl/TrustedUrlHygieneCheck.js +3 -1
- package/lib/checks/registry.js +4 -0
- package/lib/checks/support/integrationAccounts.d.ts +35 -0
- package/lib/checks/support/integrationAccounts.js +209 -0
- package/lib/commands/audit/preflight.d.ts +13 -0
- package/lib/commands/audit/preflight.js +56 -0
- package/lib/commands/audit/security.d.ts +16 -3
- package/lib/commands/audit/security.js +40 -10
- package/lib/compliance/catalogs/gdpr.d.ts +3 -0
- package/lib/compliance/catalogs/gdpr.js +54 -0
- package/lib/compliance/catalogs/hipaa.d.ts +3 -0
- package/lib/compliance/catalogs/hipaa.js +97 -0
- package/lib/compliance/catalogs/index.js +4 -0
- package/lib/compliance/mapping.js +111 -36
- package/lib/findings/CheckMeta.js +2 -0
- package/lib/findings/digest.d.ts +50 -0
- package/lib/findings/digest.js +56 -0
- package/lib/findings/exitCode.d.ts +28 -0
- package/lib/findings/exitCode.js +46 -0
- package/lib/findings/loadScoringConfig.js +5 -5
- package/lib/preflight/permissionMap.d.ts +47 -0
- package/lib/preflight/permissionMap.js +84 -0
- package/lib/preflight/readPermissions.d.ts +11 -0
- package/lib/preflight/readPermissions.js +20 -0
- package/lib/renderers/HtmlRenderer.js +1 -1
- package/messages/audit.security.md +6 -0
- package/package.json +5 -3
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { CHECKS } from '../../checks/registry.js';
|
|
3
|
+
import { buildPreflight } from '../../preflight/permissionMap.js';
|
|
4
|
+
import { readEffectivePermissions } from '../../preflight/readPermissions.js';
|
|
5
|
+
import { buildApiClients } from '../../lib/wire.js';
|
|
6
|
+
export default class AuditPreflightCommand extends SfCommand {
|
|
7
|
+
static summary = 'Report what this audit user will and will not be able to establish';
|
|
8
|
+
static description = "Reads the running user's effective permissions in a single query and reports which checks will " +
|
|
9
|
+
'produce a verdict and which will return inconclusive, before an audit is run. The audit itself can ' +
|
|
10
|
+
'only report a permission gap after it has already come back blind; this answers the same question ' +
|
|
11
|
+
'up front, while it is still cheap to fix. Read-only, and opens no more than one query.';
|
|
12
|
+
static examples = [
|
|
13
|
+
'<%= config.bin %> <%= command.id %> --target-org myOrg',
|
|
14
|
+
'<%= config.bin %> <%= command.id %> --target-org myOrg --json',
|
|
15
|
+
];
|
|
16
|
+
static flags = {
|
|
17
|
+
'target-org': Flags.requiredOrg(),
|
|
18
|
+
};
|
|
19
|
+
async run() {
|
|
20
|
+
const { flags } = await this.parse(AuditPreflightCommand);
|
|
21
|
+
const conn = flags['target-org'].getConnection();
|
|
22
|
+
const { soql } = buildApiClients(conn);
|
|
23
|
+
const granted = await readEffectivePermissions(soql);
|
|
24
|
+
const preflight = buildPreflight(granted, CHECKS);
|
|
25
|
+
this.printPreflight(preflight);
|
|
26
|
+
return preflight;
|
|
27
|
+
}
|
|
28
|
+
printPreflight(p) {
|
|
29
|
+
this.log('');
|
|
30
|
+
if (p.missing.length === 0) {
|
|
31
|
+
this.log(` All ${CHECKS.length} checks can gather evidence. Nothing to grant.`);
|
|
32
|
+
this.log('');
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
this.log(` ${p.willRun} of ${CHECKS.length} checks can gather evidence.`);
|
|
36
|
+
if (p.willBeInconclusive.length > 0) {
|
|
37
|
+
this.log(` ${p.willBeInconclusive.length} will return inconclusive as things stand.`);
|
|
38
|
+
}
|
|
39
|
+
this.log('');
|
|
40
|
+
this.log(' Missing permissions');
|
|
41
|
+
this.log(' ───────────────────');
|
|
42
|
+
for (const m of p.missing) {
|
|
43
|
+
this.log(` ${m.blocking ? '[blocking] ' : ''}${m.label} (${m.permission})`);
|
|
44
|
+
this.log(` ${m.impact}`);
|
|
45
|
+
if (m.affectedChecks.length > 0) {
|
|
46
|
+
this.log(` Affects ${m.affectedChecks.length} check${m.affectedChecks.length !== 1 ? 's' : ''}: ${m.affectedChecks.join(', ')}`);
|
|
47
|
+
}
|
|
48
|
+
this.log('');
|
|
49
|
+
}
|
|
50
|
+
if (!p.canRun) {
|
|
51
|
+
this.log(' The audit cannot run at all until the blocking permission is granted.');
|
|
52
|
+
this.log('');
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=preflight.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
2
|
import type { AuditResult } from '../../findings/AuditResult.js';
|
|
3
|
-
|
|
3
|
+
import { type AuditDigest } from '../../findings/digest.js';
|
|
4
|
+
export default class SecurityAuditCommand extends SfCommand<AuditResult | AuditDigest> {
|
|
4
5
|
static summary: string;
|
|
5
6
|
static description: string;
|
|
6
7
|
static examples: string[];
|
|
@@ -9,6 +10,8 @@ export default class SecurityAuditCommand extends SfCommand<AuditResult> {
|
|
|
9
10
|
format: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
11
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
12
|
'fail-on': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
digest: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
'fail-on-inconclusive': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
15
|
checks: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
16
|
'scoring-config': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
17
|
'prepared-for': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -17,13 +20,23 @@ export default class SecurityAuditCommand extends SfCommand<AuditResult> {
|
|
|
17
20
|
frameworks: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
21
|
'resolve-domains': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
19
22
|
};
|
|
20
|
-
run(): Promise<AuditResult>;
|
|
23
|
+
run(): Promise<AuditResult | AuditDigest>;
|
|
21
24
|
/** Resolve --checks to the checks to run, erroring on any unknown ID. */
|
|
22
25
|
private resolveChecks;
|
|
23
26
|
/** Resolve --format to a validated list, erroring on any unknown format. */
|
|
24
27
|
private resolveFormats;
|
|
25
28
|
private rendererFor;
|
|
26
29
|
private printSummary;
|
|
27
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Set the process exit code from the audit outcome.
|
|
32
|
+
*
|
|
33
|
+
* 0 clean · 1 findings at or above --fail-on · 3 inconclusive checks when the
|
|
34
|
+
* caller passed --fail-on-inconclusive. Anything that stops the audit running
|
|
35
|
+
* at all surfaces as oclif's own error exit instead.
|
|
36
|
+
*
|
|
37
|
+
* The result is always returned, so `--json` still yields the full report
|
|
38
|
+
* alongside a non-zero exit.
|
|
39
|
+
*/
|
|
40
|
+
private applyExitCode;
|
|
28
41
|
}
|
|
29
42
|
//# sourceMappingURL=security.d.ts.map
|
|
@@ -12,6 +12,8 @@ import { resolveFrameworks } from '../../compliance/resolve.js';
|
|
|
12
12
|
import { buildAuditContext, resolveOrgInfo } from '../../lib/wire.js';
|
|
13
13
|
import { loadScoringConfig } from '../../findings/loadScoringConfig.js';
|
|
14
14
|
import { HistoryStore } from '../../history/HistoryStore.js';
|
|
15
|
+
import { EXIT_FINDINGS, EXIT_INCONCLUSIVE, resolveExitCode, violationsFor } from '../../findings/exitCode.js';
|
|
16
|
+
import { buildDigest } from '../../findings/digest.js';
|
|
15
17
|
const RENDERERS = {
|
|
16
18
|
html: new HtmlRenderer(),
|
|
17
19
|
md: new MarkdownRenderer(),
|
|
@@ -41,6 +43,14 @@ export default class SecurityAuditCommand extends SfCommand {
|
|
|
41
43
|
summary: 'Exit with code 1 if any finding is at or above this severity.',
|
|
42
44
|
options: ['CRITICAL', 'HIGH', 'MEDIUM', 'LOW'],
|
|
43
45
|
}),
|
|
46
|
+
digest: Flags.boolean({
|
|
47
|
+
summary: 'Return a compact, token-cheap result: no passing checks, no detail prose, capped affected lists.',
|
|
48
|
+
default: false,
|
|
49
|
+
}),
|
|
50
|
+
'fail-on-inconclusive': Flags.boolean({
|
|
51
|
+
summary: 'Exit with code 3 if any check could not gather evidence. Off by default.',
|
|
52
|
+
default: false,
|
|
53
|
+
}),
|
|
44
54
|
checks: Flags.string({
|
|
45
55
|
summary: 'Comma-separated check IDs to run. Omit to run all checks.',
|
|
46
56
|
helpValue: 'hardcoded-credentials,apex-sharing',
|
|
@@ -109,10 +119,10 @@ export default class SecurityAuditCommand extends SfCommand {
|
|
|
109
119
|
this.printSummary(result);
|
|
110
120
|
this.log('');
|
|
111
121
|
this.log(' Deep dives: https://softwareinsights.dev · Remediation help: https://cloudcounsel.co.nz');
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
return result;
|
|
122
|
+
// Exit code is resolved from the full result: the digest drops passing checks,
|
|
123
|
+
// which the threshold logic must still be able to see and discount.
|
|
124
|
+
this.applyExitCode(result, flags['fail-on'], flags['fail-on-inconclusive']);
|
|
125
|
+
return flags.digest ? buildDigest(result) : result;
|
|
116
126
|
}
|
|
117
127
|
/** Resolve --checks to the checks to run, erroring on any unknown ID. */
|
|
118
128
|
resolveChecks(raw) {
|
|
@@ -169,17 +179,37 @@ export default class SecurityAuditCommand extends SfCommand {
|
|
|
169
179
|
this.log(` Score: ${result.healthScore}/100 Grade: ${result.grade}`);
|
|
170
180
|
this.log('─────────────────────────────');
|
|
171
181
|
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
182
|
+
/**
|
|
183
|
+
* Set the process exit code from the audit outcome.
|
|
184
|
+
*
|
|
185
|
+
* 0 clean · 1 findings at or above --fail-on · 3 inconclusive checks when the
|
|
186
|
+
* caller passed --fail-on-inconclusive. Anything that stops the audit running
|
|
187
|
+
* at all surfaces as oclif's own error exit instead.
|
|
188
|
+
*
|
|
189
|
+
* The result is always returned, so `--json` still yields the full report
|
|
190
|
+
* alongside a non-zero exit.
|
|
191
|
+
*/
|
|
192
|
+
applyExitCode(result, failOn, failOnInconclusive) {
|
|
193
|
+
const code = resolveExitCode(result.findings, { failOn, failOnInconclusive });
|
|
194
|
+
if (code === EXIT_FINDINGS && failOn !== undefined) {
|
|
195
|
+
const violations = violationsFor(result.findings, failOn);
|
|
177
196
|
this.log(`\nFail-on threshold: ${failOn}, ${violations.length} finding${violations.length !== 1 ? 's' : ''} at or above threshold:`);
|
|
178
197
|
for (const f of violations) {
|
|
179
198
|
this.log(` [${f.riskLevel}] ${f.title}`);
|
|
180
199
|
}
|
|
181
|
-
this.exit(1);
|
|
182
200
|
}
|
|
201
|
+
if (code === EXIT_INCONCLUSIVE) {
|
|
202
|
+
const blind = result.findings.filter((f) => f.inconclusive === true);
|
|
203
|
+
this.log(`\n${blind.length} check${blind.length !== 1 ? 's' : ''} could not gather evidence:`);
|
|
204
|
+
for (const f of blind) {
|
|
205
|
+
this.log(` [inconclusive] ${f.title}`);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
// Deliberately not this.exit(): that throws an ExitError, which SfCommand.catch()
|
|
209
|
+
// renders as the JSON error envelope, discarding the audit result under --json.
|
|
210
|
+
// Setting the code lets run() return the report and still exit non-zero.
|
|
211
|
+
if (code !== 0)
|
|
212
|
+
process.exitCode = code;
|
|
183
213
|
}
|
|
184
214
|
}
|
|
185
215
|
//# sourceMappingURL=security.js.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// GDPR — Regulation (EU) 2016/679 of the European Parliament and of the Council of 27 April 2016
|
|
2
|
+
// on the protection of natural persons with regard to the processing of personal data and on the
|
|
3
|
+
// free movement of such data, and repealing Directive 95/46/EC.
|
|
4
|
+
//
|
|
5
|
+
// Article headings and the quoted text of Art. 5(1)(f), 25 and 32(1)(a)-(d) verified 2026-08
|
|
6
|
+
// against the consolidated regulation text; the Official Journal (OJ L 119, 4.5.2016) is the
|
|
7
|
+
// canonical reference.
|
|
8
|
+
//
|
|
9
|
+
// Scope note: GDPR is a regulation about processing, not a technical control set, so only the
|
|
10
|
+
// articles that a read-only Salesforce org-configuration review can produce evidence for are
|
|
11
|
+
// catalogued. Articles covering lawful basis, data-subject rights, DPIAs (Art. 35), controller /
|
|
12
|
+
// processor contracts and supervisory-authority procedure are out of scope for this tool and
|
|
13
|
+
// deliberately absent — their absence is not a claim that they do not apply.
|
|
14
|
+
//
|
|
15
|
+
// Where a paragraph is mapped rather than a whole article (Art. 5(1)(f), Art. 32(1)(a)/(b)/(d)),
|
|
16
|
+
// the id names the paragraph so a finding cites the specific obligation, not the article at large.
|
|
17
|
+
const V = 'Regulation (EU) 2016/679';
|
|
18
|
+
const URL = 'https://eur-lex.europa.eu/eli/reg/2016/679/oj/eng';
|
|
19
|
+
const ref = (cite) => `Regulation (EU) 2016/679, ${cite}`;
|
|
20
|
+
export const GDPR_CONTROLS = [
|
|
21
|
+
{ id: 'GDPR-Art5(1)(f)', framework: 'GDPR', version: V,
|
|
22
|
+
title: 'Integrity and confidentiality',
|
|
23
|
+
requirement: 'Personal data shall be processed in a manner that ensures appropriate security of the personal data, including protection against unauthorised or unlawful processing and against accidental loss, destruction or damage, using appropriate technical or organisational measures.',
|
|
24
|
+
sourceRef: ref('Art. 5(1)(f)'), url: URL, verified: true },
|
|
25
|
+
{ id: 'GDPR-Art25', framework: 'GDPR', version: V,
|
|
26
|
+
title: 'Data protection by design and by default',
|
|
27
|
+
requirement: 'The controller shall implement appropriate technical and organisational measures for ensuring that, by default, only personal data which are necessary for each specific purpose are processed — including their accessibility. Such measures shall ensure that by default personal data are not made accessible without the individual\'s intervention to an indefinite number of natural persons.',
|
|
28
|
+
sourceRef: ref('Art. 25(1)-(2)'), url: URL, verified: true },
|
|
29
|
+
{ id: 'GDPR-Art30', framework: 'GDPR', version: V,
|
|
30
|
+
title: 'Records of processing activities',
|
|
31
|
+
requirement: 'Each controller shall maintain a record of processing activities under its responsibility, including the categories of personal data processed, the categories of recipients to whom the data have been disclosed, and transfers to third countries.',
|
|
32
|
+
sourceRef: ref('Art. 30(1)'), url: URL, verified: true },
|
|
33
|
+
{ id: 'GDPR-Art32(1)(a)', framework: 'GDPR', version: V,
|
|
34
|
+
title: 'Pseudonymisation and encryption of personal data',
|
|
35
|
+
requirement: 'Taking account of the state of the art and the risks of the processing, the controller and processor shall implement appropriate technical and organisational measures including the pseudonymisation and encryption of personal data.',
|
|
36
|
+
sourceRef: ref('Art. 32(1)(a)'), url: URL, verified: true },
|
|
37
|
+
{ id: 'GDPR-Art32(1)(b)', framework: 'GDPR', version: V,
|
|
38
|
+
title: 'Ongoing confidentiality, integrity, availability and resilience',
|
|
39
|
+
requirement: 'The controller and processor shall implement measures providing the ability to ensure the ongoing confidentiality, integrity, availability and resilience of processing systems and services.',
|
|
40
|
+
sourceRef: ref('Art. 32(1)(b)'), url: URL, verified: true },
|
|
41
|
+
{ id: 'GDPR-Art32(1)(d)', framework: 'GDPR', version: V,
|
|
42
|
+
title: 'Regular testing and evaluation of security measures',
|
|
43
|
+
requirement: 'The controller and processor shall implement a process for regularly testing, assessing and evaluating the effectiveness of technical and organisational measures for ensuring the security of the processing.',
|
|
44
|
+
sourceRef: ref('Art. 32(1)(d)'), url: URL, verified: true },
|
|
45
|
+
{ id: 'GDPR-Art33', framework: 'GDPR', version: V,
|
|
46
|
+
title: 'Notification of a personal data breach to the supervisory authority',
|
|
47
|
+
requirement: 'In the case of a personal data breach, the controller shall without undue delay and, where feasible, not later than 72 hours after having become aware of it, notify the breach to the competent supervisory authority. Detecting and characterising a breach is a precondition of meeting that deadline.',
|
|
48
|
+
sourceRef: ref('Art. 33(1)'), url: URL, verified: true },
|
|
49
|
+
{ id: 'GDPR-Art44', framework: 'GDPR', version: V,
|
|
50
|
+
title: 'General principle for transfers',
|
|
51
|
+
requirement: 'Any transfer of personal data to a third country or international organisation shall take place only if the conditions of Chapter V are met, including onward transfers. All provisions of that chapter shall be applied to ensure the level of protection guaranteed by this Regulation is not undermined.',
|
|
52
|
+
sourceRef: ref('Art. 44'), url: URL, verified: true },
|
|
53
|
+
];
|
|
54
|
+
//# sourceMappingURL=gdpr.js.map
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// HIPAA Security Rule — 45 CFR Part 164, Subpart C ("Security Standards for the Protection of
|
|
2
|
+
// Electronic Protected Health Information"), as amended by the 2013 Omnibus Rule.
|
|
3
|
+
//
|
|
4
|
+
// Version pinning matters here. HHS published an NPRM on 2025-01-06 that would rewrite these
|
|
5
|
+
// safeguards — removing the Required/Addressable distinction and making encryption, MFA and
|
|
6
|
+
// network segmentation mandatory. As of 2026-08 that rule is still PROPOSED, not final, so this
|
|
7
|
+
// catalog maps the operative rule. When the final rule lands, `version` and the affected
|
|
8
|
+
// `requirement` texts must be re-pinned and re-verified, not silently amended.
|
|
9
|
+
//
|
|
10
|
+
// Standard headings and implementation-specification names verified 2026-08 against the
|
|
11
|
+
// codified text of 45 CFR 164.308 / 164.310 / 164.312, including each spec's
|
|
12
|
+
// Required vs Addressable designation. `requirement` quotes the regulatory text.
|
|
13
|
+
//
|
|
14
|
+
// Scope note: only safeguards a read-only Salesforce org-configuration review can speak to are
|
|
15
|
+
// catalogued. The physical safeguards (164.310), contingency planning (164.308(a)(7)) and the
|
|
16
|
+
// documentation requirements (164.316) are out of scope for this tool and deliberately absent —
|
|
17
|
+
// their absence is not a claim that they do not apply.
|
|
18
|
+
const V = '45 CFR Part 164 Subpart C (HIPAA Security Rule, 2013 Omnibus)';
|
|
19
|
+
const URL = 'https://www.ecfr.gov/current/title-45/subtitle-A/subchapter-C/part-164/subpart-C';
|
|
20
|
+
const ref = (cite) => `45 CFR ${cite}`;
|
|
21
|
+
export const HIPAA_CONTROLS = [
|
|
22
|
+
// --- 164.308 Administrative safeguards ---
|
|
23
|
+
{ id: 'HIPAA-164.308(a)(1)(ii)(A)', framework: 'HIPAA', version: V,
|
|
24
|
+
title: 'Risk analysis (Required)',
|
|
25
|
+
requirement: 'Conduct an accurate and thorough assessment of the potential risks and vulnerabilities to the confidentiality, integrity, and availability of electronic protected health information held by the covered entity or business associate.',
|
|
26
|
+
sourceRef: ref('164.308(a)(1)(ii)(A)'), url: URL, verified: true },
|
|
27
|
+
{ id: 'HIPAA-164.308(a)(1)(ii)(B)', framework: 'HIPAA', version: V,
|
|
28
|
+
title: 'Risk management (Required)',
|
|
29
|
+
requirement: 'Implement security measures sufficient to reduce risks and vulnerabilities to a reasonable and appropriate level.',
|
|
30
|
+
sourceRef: ref('164.308(a)(1)(ii)(B)'), url: URL, verified: true },
|
|
31
|
+
{ id: 'HIPAA-164.308(a)(1)(ii)(D)', framework: 'HIPAA', version: V,
|
|
32
|
+
title: 'Information system activity review (Required)',
|
|
33
|
+
requirement: 'Implement procedures to regularly review records of information system activity, such as audit logs, access reports, and security incident tracking reports.',
|
|
34
|
+
sourceRef: ref('164.308(a)(1)(ii)(D)'), url: URL, verified: true },
|
|
35
|
+
{ id: 'HIPAA-164.308(a)(3)', framework: 'HIPAA', version: V,
|
|
36
|
+
title: 'Workforce security',
|
|
37
|
+
requirement: 'Implement policies and procedures to ensure that all members of the workforce have appropriate access to electronic protected health information, and to prevent those who do not have access from obtaining access — including termination procedures for ending access when employment or authorisation ends.',
|
|
38
|
+
sourceRef: ref('164.308(a)(3)'), url: URL, verified: true },
|
|
39
|
+
{ id: 'HIPAA-164.308(a)(4)', framework: 'HIPAA', version: V,
|
|
40
|
+
title: 'Information access management',
|
|
41
|
+
requirement: 'Implement policies and procedures for authorising access to electronic protected health information that are consistent with the applicable requirements of subpart E, including access authorisation and access establishment and modification.',
|
|
42
|
+
sourceRef: ref('164.308(a)(4)'), url: URL, verified: true },
|
|
43
|
+
{ id: 'HIPAA-164.308(a)(5)(ii)(C)', framework: 'HIPAA', version: V,
|
|
44
|
+
title: 'Log-in monitoring (Addressable)',
|
|
45
|
+
requirement: 'Procedures for monitoring log-in attempts and reporting discrepancies.',
|
|
46
|
+
sourceRef: ref('164.308(a)(5)(ii)(C)'), url: URL, verified: true },
|
|
47
|
+
{ id: 'HIPAA-164.308(a)(5)(ii)(D)', framework: 'HIPAA', version: V,
|
|
48
|
+
title: 'Password management (Addressable)',
|
|
49
|
+
requirement: 'Procedures for creating, changing, and safeguarding passwords.',
|
|
50
|
+
sourceRef: ref('164.308(a)(5)(ii)(D)'), url: URL, verified: true },
|
|
51
|
+
{ id: 'HIPAA-164.308(a)(6)', framework: 'HIPAA', version: V,
|
|
52
|
+
title: 'Security incident procedures',
|
|
53
|
+
requirement: 'Implement policies and procedures to address security incidents, including identifying and responding to suspected or known security incidents, mitigating their harmful effects, and documenting incidents and their outcomes.',
|
|
54
|
+
sourceRef: ref('164.308(a)(6)'), url: URL, verified: true },
|
|
55
|
+
{ id: 'HIPAA-164.308(a)(8)', framework: 'HIPAA', version: V,
|
|
56
|
+
title: 'Evaluation',
|
|
57
|
+
requirement: 'Perform a periodic technical and nontechnical evaluation, in response to environmental or operational changes affecting the security of electronic protected health information, that establishes the extent to which security policies and procedures meet the requirements of this subpart.',
|
|
58
|
+
sourceRef: ref('164.308(a)(8)'), url: URL, verified: true },
|
|
59
|
+
// --- 164.312 Technical safeguards ---
|
|
60
|
+
{ id: 'HIPAA-164.312(a)(1)', framework: 'HIPAA', version: V,
|
|
61
|
+
title: 'Access control',
|
|
62
|
+
requirement: 'Implement technical policies and procedures for electronic information systems that maintain electronic protected health information to allow access only to those persons or software programs that have been granted access rights as specified in 164.308(a)(4).',
|
|
63
|
+
sourceRef: ref('164.312(a)(1)'), url: URL, verified: true },
|
|
64
|
+
{ id: 'HIPAA-164.312(a)(2)(i)', framework: 'HIPAA', version: V,
|
|
65
|
+
title: 'Unique user identification (Required)',
|
|
66
|
+
requirement: 'Assign a unique name and/or number for identifying and tracking user identity.',
|
|
67
|
+
sourceRef: ref('164.312(a)(2)(i)'), url: URL, verified: true },
|
|
68
|
+
{ id: 'HIPAA-164.312(a)(2)(iii)', framework: 'HIPAA', version: V,
|
|
69
|
+
title: 'Automatic logoff (Addressable)',
|
|
70
|
+
requirement: 'Implement electronic procedures that terminate an electronic session after a predetermined time of inactivity.',
|
|
71
|
+
sourceRef: ref('164.312(a)(2)(iii)'), url: URL, verified: true },
|
|
72
|
+
{ id: 'HIPAA-164.312(a)(2)(iv)', framework: 'HIPAA', version: V,
|
|
73
|
+
title: 'Encryption and decryption (Addressable)',
|
|
74
|
+
requirement: 'Implement a mechanism to encrypt and decrypt electronic protected health information.',
|
|
75
|
+
sourceRef: ref('164.312(a)(2)(iv)'), url: URL, verified: true },
|
|
76
|
+
{ id: 'HIPAA-164.312(b)', framework: 'HIPAA', version: V,
|
|
77
|
+
title: 'Audit controls',
|
|
78
|
+
requirement: 'Implement hardware, software, and/or procedural mechanisms that record and examine activity in information systems that contain or use electronic protected health information.',
|
|
79
|
+
sourceRef: ref('164.312(b)'), url: URL, verified: true },
|
|
80
|
+
{ id: 'HIPAA-164.312(c)(1)', framework: 'HIPAA', version: V,
|
|
81
|
+
title: 'Integrity',
|
|
82
|
+
requirement: 'Implement policies and procedures to protect electronic protected health information from improper alteration or destruction.',
|
|
83
|
+
sourceRef: ref('164.312(c)(1)'), url: URL, verified: true },
|
|
84
|
+
{ id: 'HIPAA-164.312(d)', framework: 'HIPAA', version: V,
|
|
85
|
+
title: 'Person or entity authentication',
|
|
86
|
+
requirement: 'Implement procedures to verify that a person or entity seeking access to electronic protected health information is the one claimed.',
|
|
87
|
+
sourceRef: ref('164.312(d)'), url: URL, verified: true },
|
|
88
|
+
{ id: 'HIPAA-164.312(e)(1)', framework: 'HIPAA', version: V,
|
|
89
|
+
title: 'Transmission security',
|
|
90
|
+
requirement: 'Implement technical security measures to guard against unauthorised access to electronic protected health information that is being transmitted over an electronic communications network.',
|
|
91
|
+
sourceRef: ref('164.312(e)(1)'), url: URL, verified: true },
|
|
92
|
+
{ id: 'HIPAA-164.312(e)(2)(ii)', framework: 'HIPAA', version: V,
|
|
93
|
+
title: 'Encryption in transmission (Addressable)',
|
|
94
|
+
requirement: 'Implement a mechanism to encrypt electronic protected health information whenever deemed appropriate.',
|
|
95
|
+
sourceRef: ref('164.312(e)(2)(ii)'), url: URL, verified: true },
|
|
96
|
+
];
|
|
97
|
+
//# sourceMappingURL=hipaa.js.map
|
|
@@ -6,6 +6,8 @@ import { SBS_CONTROLS } from './sbs.js';
|
|
|
6
6
|
import { PRIVACY_ACT_CONTROLS } from './privacyAct.js';
|
|
7
7
|
import { HISO10029_CONTROLS } from './hiso10029.js';
|
|
8
8
|
import { NZISM_CONTROLS } from './nzism.js';
|
|
9
|
+
import { HIPAA_CONTROLS } from './hipaa.js';
|
|
10
|
+
import { GDPR_CONTROLS } from './gdpr.js';
|
|
9
11
|
export const ALL_CONTROLS = [
|
|
10
12
|
...OWASP_CONTROLS,
|
|
11
13
|
...OWASP_LLM_CONTROLS,
|
|
@@ -15,6 +17,8 @@ export const ALL_CONTROLS = [
|
|
|
15
17
|
...PRIVACY_ACT_CONTROLS,
|
|
16
18
|
...HISO10029_CONTROLS,
|
|
17
19
|
...NZISM_CONTROLS,
|
|
20
|
+
...HIPAA_CONTROLS,
|
|
21
|
+
...GDPR_CONTROLS,
|
|
18
22
|
];
|
|
19
23
|
const BY_ID = new Map(ALL_CONTROLS.map((c) => [c.id, c]));
|
|
20
24
|
export function getControl(id) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// Maps each check id to the compliance control ids it relates to.
|
|
2
|
-
// Migrated from the former ComplianceMapping.
|
|
3
|
-
// until their catalogs land (later plan). A08/A10 are mapped precisely:
|
|
2
|
+
// Migrated from the former ComplianceMapping. A08/A10 are mapped precisely:
|
|
4
3
|
// A10 (SSRF) → egress controls (remote-sites, csp-trusted-sites, named-credentials)
|
|
5
4
|
// A08 (Software & Data Integrity) → installed-packages, deployment-identity
|
|
6
5
|
// NZ pack control ids (HISO/NZISM/Privacy Act) are layered on by domain via NZ_CROSSWALK below.
|
|
@@ -33,6 +32,7 @@ const BASE_CHECK_CONTROL_MAP = {
|
|
|
33
32
|
'mfa-enforcement': ['OWASP-A07', 'SOC2-CC6.1', 'ISO-A.8.3', 'SBS-AUTH-004'],
|
|
34
33
|
'api-client-permission': ['OWASP-A01', 'SOC2-CC6.3', 'ISO-A.8.3', 'SBS-ACS-006'],
|
|
35
34
|
'integration-users': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.5.18', 'SBS-ACS-007', 'SBS-ACS-008', 'SBS-ACS-009'],
|
|
35
|
+
'integration-least-privilege': ['OWASP-A01', 'SOC2-CC6.3', 'ISO-A.5.18', 'SBS-ACS-008', 'SBS-ACS-009'],
|
|
36
36
|
'content-links': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.5.14', 'SBS-FILE-001', 'SBS-FILE-002', 'SBS-FILE-003'],
|
|
37
37
|
'field-history-tracking': ['OWASP-A09', 'SOC2-CC7.2', 'ISO-A.8.15', 'SBS-DATA-004'],
|
|
38
38
|
'data-classification': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.5.12', 'SBS-DATA-001', 'SBS-DATA-002'],
|
|
@@ -81,6 +81,7 @@ const BASE_CHECK_CONTROL_MAP = {
|
|
|
81
81
|
'classic-sites': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.8.3', 'SBS-CPORTAL-003'],
|
|
82
82
|
'auth-providers': ['OWASP-A07', 'SOC2-CC6.1', 'ISO-A.8.3', 'SBS-AUTH-001'],
|
|
83
83
|
'guest-api-access': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.5.18', 'SBS-CPORTAL-002'],
|
|
84
|
+
'guest-user-visibility': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.5.18', 'SBS-CPORTAL-002'],
|
|
84
85
|
'external-credentials': ['OWASP-A02', 'SOC2-CC6.7', 'ISO-A.8.3', 'SBS-INT-003'],
|
|
85
86
|
'login-anomaly': ['OWASP-A09', 'SOC2-CC7.2', 'ISO-A.8.15', 'SBS-MON-003'],
|
|
86
87
|
'session-hardening': ['OWASP-A05', 'SOC2-CC6.1', 'ISO-A.8.26'],
|
|
@@ -107,50 +108,124 @@ const BASE_CHECK_CONTROL_MAP = {
|
|
|
107
108
|
'agent-monitoring-coverage': ['OWASP-A09', 'SOC2-CC7.2', 'ISO-A.8.15', 'LLM02'],
|
|
108
109
|
'trusted-url-hygiene': ['OWASP-A05', 'OWASP-A10', 'SOC2-CC6.6', 'ISO-A.8.26', 'LLM01', 'LLM05'],
|
|
109
110
|
};
|
|
110
|
-
//
|
|
111
|
-
// layered onto
|
|
112
|
-
//
|
|
111
|
+
// Domain groupings. Each check belongs to exactly one domain, and a domain's control ids are
|
|
112
|
+
// layered onto every base entry in it. Shared by the NZ pack and the HIPAA/GDPR crosswalk below
|
|
113
|
+
// so the two cannot drift apart in which checks they consider part of a domain.
|
|
114
|
+
const DOMAIN = {
|
|
115
|
+
accessControl: ['users-and-admins', 'permissions', 'sharing-model', 'public-group-sharing', 'guest-user-access',
|
|
116
|
+
'field-level-security', 'standard-profiles', 'api-client-permission', 'integration-users',
|
|
117
|
+
'integration-least-privilege',
|
|
118
|
+
'escalation-perms', 'report-folder-access', 'apex-crud-fls', 'apex-rest-endpoint',
|
|
119
|
+
'guest-executable-apex', 'experience-cloud-site', 'content-links', 'apex-sharing', 'flows-without-sharing',
|
|
120
|
+
'public-content-exposure', 'privileged-access', 'separation-of-duties',
|
|
121
|
+
'guest-object-exposure', 'guest-site-options', 'guest-record-access-policy',
|
|
122
|
+
'login-access-policy', 'data-export-access', 'classic-sites', 'guest-api-access',
|
|
123
|
+
'guest-user-visibility'],
|
|
124
|
+
authentication: ['login-session', 'ip-restrictions', 'password-session-policy', 'sso-enforcement', 'mfa-enforcement',
|
|
125
|
+
'trusted-ip-ranges', 'my-domain-login-policy', 'high-assurance-session', 'internal-user-mfa',
|
|
126
|
+
'mfa-registration', 'mfa-method-strength', 'failed-login-detection', 'enhanced-domains',
|
|
127
|
+
'auth-providers'],
|
|
128
|
+
crypto: ['named-credentials', 'hardcoded-credentials', 'custom-settings', 'certificate-expiry', 'custom-labels-credential', 'external-credentials', 'encryption-coverage'],
|
|
129
|
+
logging: ['audit-trail', 'apex-logging', 'event-monitoring', 'siem-integration', 'anonymous-apex-audit',
|
|
130
|
+
'debug-log-access', 'transaction-security-policy', 'threat-detection', 'guest-traffic-anomaly',
|
|
131
|
+
'login-anomaly'],
|
|
132
|
+
devSecurity: ['code-security', 'visualforce-xss', 'scheduled-apex'],
|
|
133
|
+
network: ['remote-sites', 'csp-trusted-sites', 'connected-apps', 'connected-app-scope', 'connected-app-inactivity', 'cors-allowlist',
|
|
134
|
+
'email-security', 'outbound-messages', 'experience-csp'],
|
|
135
|
+
dataGovernance: ['data-classification', 'field-history-tracking', 'sandbox-data-masking'],
|
|
136
|
+
configGovernance: ['health-check', 'api-limits', 'release-updates', 'legacy-api-version', 'installed-packages', 'deployment-identity', 'session-hardening'],
|
|
137
|
+
accountLifecycle: ['inactive-users'],
|
|
138
|
+
// Agentforce / GenAI. The NZ pack does not map these (HISO/NZISM predate agentic platforms and
|
|
139
|
+
// have no chapter that fits); HIPAA and GDPR do, because an over-privileged agent user reading
|
|
140
|
+
// PHI or personal data is squarely an access-control and security-of-processing question.
|
|
141
|
+
aiAgents: ['agent-inventory', 'agent-user-privilege', 'agent-action-surface', 'agent-channel-exposure',
|
|
142
|
+
'agent-monitoring-coverage', 'trusted-url-hygiene'],
|
|
143
|
+
};
|
|
144
|
+
// NZ pack crosswalk — HISO/NZISM are domain/chapter-level; Privacy Act IPPs are statute-level.
|
|
113
145
|
const NZ_CROSSWALK = [
|
|
114
|
-
{ controls: ['HISO-AC', 'NZISM-AC', 'PRIVACY-IPP5'],
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
{ controls: ['
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
{ controls: ['
|
|
139
|
-
checks:
|
|
140
|
-
{ controls: ['
|
|
141
|
-
checks:
|
|
142
|
-
{ controls: ['
|
|
143
|
-
checks:
|
|
146
|
+
{ controls: ['HISO-AC', 'NZISM-AC', 'PRIVACY-IPP5'], checks: DOMAIN.accessControl },
|
|
147
|
+
{ controls: ['HISO-AUTH', 'NZISM-AUTH', 'PRIVACY-IPP5'], checks: DOMAIN.authentication },
|
|
148
|
+
{ controls: ['HISO-CRYPTO', 'NZISM-CRYPTO', 'PRIVACY-IPP5'], checks: DOMAIN.crypto },
|
|
149
|
+
{ controls: ['HISO-LOG', 'NZISM-LOG'], checks: DOMAIN.logging },
|
|
150
|
+
{ controls: ['HISO-DEV', 'NZISM-SW'], checks: DOMAIN.devSecurity },
|
|
151
|
+
{ controls: ['HISO-COMM', 'NZISM-NET', 'PRIVACY-IPP12'], checks: DOMAIN.network },
|
|
152
|
+
{ controls: ['HISO-DATA', 'PRIVACY-IPP5'], checks: DOMAIN.dataGovernance },
|
|
153
|
+
{ controls: ['HISO-GOV', 'NZISM-CONFIG'], checks: DOMAIN.configGovernance },
|
|
154
|
+
{ controls: ['PRIVACY-IPP9'], checks: DOMAIN.accountLifecycle },
|
|
155
|
+
];
|
|
156
|
+
// HIPAA / GDPR crosswalk — the domain-wide obligations. Anything narrower than a whole domain is
|
|
157
|
+
// mapped per check in REGULATORY_PRECISE below rather than swept across the domain, because these
|
|
158
|
+
// ids name a specific implementation specification or article paragraph: claiming "automatic
|
|
159
|
+
// logoff" against all fourteen authentication checks would be the imprecision the sourced catalog
|
|
160
|
+
// exists to avoid.
|
|
161
|
+
const REGULATORY_CROSSWALK = [
|
|
162
|
+
{ controls: ['HIPAA-164.312(a)(1)', 'HIPAA-164.308(a)(4)', 'GDPR-Art5(1)(f)', 'GDPR-Art25', 'GDPR-Art32(1)(b)'],
|
|
163
|
+
checks: DOMAIN.accessControl },
|
|
164
|
+
{ controls: ['HIPAA-164.312(d)', 'GDPR-Art5(1)(f)', 'GDPR-Art32(1)(b)'],
|
|
165
|
+
checks: DOMAIN.authentication },
|
|
166
|
+
{ controls: ['HIPAA-164.312(a)(2)(iv)', 'GDPR-Art32(1)(a)', 'GDPR-Art5(1)(f)'],
|
|
167
|
+
checks: DOMAIN.crypto },
|
|
168
|
+
{ controls: ['HIPAA-164.312(b)', 'HIPAA-164.308(a)(1)(ii)(D)', 'GDPR-Art32(1)(b)', 'GDPR-Art33'],
|
|
169
|
+
checks: DOMAIN.logging },
|
|
170
|
+
{ controls: ['HIPAA-164.312(c)(1)', 'GDPR-Art25', 'GDPR-Art32(1)(b)'],
|
|
171
|
+
checks: DOMAIN.devSecurity },
|
|
172
|
+
{ controls: ['HIPAA-164.312(e)(1)', 'GDPR-Art44', 'GDPR-Art32(1)(b)'],
|
|
173
|
+
checks: DOMAIN.network },
|
|
174
|
+
{ controls: ['HIPAA-164.308(a)(1)(ii)(A)', 'HIPAA-164.312(c)(1)', 'GDPR-Art30', 'GDPR-Art5(1)(f)'],
|
|
175
|
+
checks: DOMAIN.dataGovernance },
|
|
176
|
+
{ controls: ['HIPAA-164.308(a)(1)(ii)(B)', 'HIPAA-164.308(a)(8)', 'GDPR-Art32(1)(d)'],
|
|
177
|
+
checks: DOMAIN.configGovernance },
|
|
178
|
+
{ controls: ['HIPAA-164.308(a)(3)', 'GDPR-Art5(1)(f)'],
|
|
179
|
+
checks: DOMAIN.accountLifecycle },
|
|
144
180
|
];
|
|
181
|
+
// Per-check HIPAA/GDPR additions, where the obligation is narrower than its domain.
|
|
182
|
+
const REGULATORY_PRECISE = {
|
|
183
|
+
// Shared/service identities vs "assign a unique name and/or number for identifying and tracking user identity".
|
|
184
|
+
'integration-users': ['HIPAA-164.312(a)(2)(i)'],
|
|
185
|
+
// Session inactivity timeout is the automatic-logoff specification; password rules are their own.
|
|
186
|
+
'password-session-policy': ['HIPAA-164.312(a)(2)(iii)', 'HIPAA-164.308(a)(5)(ii)(D)'],
|
|
187
|
+
'session-hardening': ['HIPAA-164.312(a)(2)(iii)'],
|
|
188
|
+
// Monitoring log-in attempts and reporting discrepancies.
|
|
189
|
+
'login-session': ['HIPAA-164.308(a)(5)(ii)(C)'],
|
|
190
|
+
'failed-login-detection': ['HIPAA-164.308(a)(5)(ii)(C)'],
|
|
191
|
+
'login-anomaly': ['HIPAA-164.308(a)(5)(ii)(C)'],
|
|
192
|
+
// Identifying and responding to suspected or known security incidents.
|
|
193
|
+
'transaction-security-policy': ['HIPAA-164.308(a)(6)'],
|
|
194
|
+
'threat-detection': ['HIPAA-164.308(a)(6)'],
|
|
195
|
+
'guest-traffic-anomaly': ['HIPAA-164.308(a)(6)'],
|
|
196
|
+
// Cleartext transport of PHI/personal data — encryption in transmission.
|
|
197
|
+
'remote-sites': ['HIPAA-164.312(e)(2)(ii)'],
|
|
198
|
+
'csp-trusted-sites': ['HIPAA-164.312(e)(2)(ii)'],
|
|
199
|
+
'outbound-messages': ['HIPAA-164.312(e)(2)(ii)'],
|
|
200
|
+
'email-security': ['HIPAA-164.312(e)(2)(ii)'],
|
|
201
|
+
'experience-csp': ['HIPAA-164.312(e)(2)(ii)'],
|
|
202
|
+
// Data Mask is pseudonymisation in the Art. 32(1)(a) sense; unmasked prod data in a sandbox is
|
|
203
|
+
// also a by-default-accessibility failure under Art. 25.
|
|
204
|
+
'sandbox-data-masking': ['GDPR-Art32(1)(a)', 'GDPR-Art25'],
|
|
205
|
+
// Agentforce / GenAI — see DOMAIN.aiAgents.
|
|
206
|
+
'agent-inventory': ['HIPAA-164.308(a)(4)', 'GDPR-Art30'],
|
|
207
|
+
'agent-user-privilege': ['HIPAA-164.312(a)(1)', 'HIPAA-164.308(a)(4)', 'GDPR-Art5(1)(f)', 'GDPR-Art32(1)(b)'],
|
|
208
|
+
'agent-action-surface': ['HIPAA-164.312(a)(1)', 'HIPAA-164.312(c)(1)', 'GDPR-Art25'],
|
|
209
|
+
'agent-channel-exposure': ['HIPAA-164.312(a)(1)', 'GDPR-Art25', 'GDPR-Art5(1)(f)'],
|
|
210
|
+
'agent-monitoring-coverage': ['HIPAA-164.312(b)', 'HIPAA-164.308(a)(1)(ii)(D)', 'GDPR-Art33'],
|
|
211
|
+
'trusted-url-hygiene': ['HIPAA-164.312(e)(1)', 'GDPR-Art44'],
|
|
212
|
+
};
|
|
145
213
|
function buildCheckControlMap() {
|
|
146
214
|
const map = {};
|
|
147
215
|
for (const [check, ids] of Object.entries(BASE_CHECK_CONTROL_MAP))
|
|
148
216
|
map[check] = [...ids];
|
|
149
|
-
for (const group of NZ_CROSSWALK) {
|
|
217
|
+
for (const group of [...NZ_CROSSWALK, ...REGULATORY_CROSSWALK]) {
|
|
150
218
|
for (const check of group.checks) {
|
|
151
219
|
(map[check] ??= []).push(...group.controls);
|
|
152
220
|
}
|
|
153
221
|
}
|
|
222
|
+
for (const [check, ids] of Object.entries(REGULATORY_PRECISE)) {
|
|
223
|
+
(map[check] ??= []).push(...ids);
|
|
224
|
+
}
|
|
225
|
+
// A control can arrive from both a crosswalk and a precise entry; a compliance matrix must not
|
|
226
|
+
// render the same control twice for one check.
|
|
227
|
+
for (const check of Object.keys(map))
|
|
228
|
+
map[check] = [...new Set(map[check])];
|
|
154
229
|
return map;
|
|
155
230
|
}
|
|
156
231
|
export const CHECK_CONTROL_MAP = buildCheckControlMap();
|
|
@@ -27,6 +27,7 @@ export const CHECK_META = {
|
|
|
27
27
|
'mfa-enforcement': { effort: 'quick', impact: 'Portal/external users without MFA let a stolen password reach customer or partner data directly.' },
|
|
28
28
|
'api-client-permission': { effort: 'quick', impact: '“Use Any API Client” bypasses API Access Control, letting a user reach the org from any tool.' },
|
|
29
29
|
'integration-users': { effort: 'moderate', impact: 'Over-privileged service accounts are prime targets: one stolen key grants broad, unattended access.' },
|
|
30
|
+
'integration-least-privilege': { effort: 'moderate', impact: 'An integration account keeps whatever it was granted at go-live: long-lived credentials, no interactive user to notice misuse, and frequently outside MFA and IP restrictions. Every permission it is not using is standing privilege waiting on a leaked key.' },
|
|
30
31
|
'content-links': { effort: 'quick', impact: 'Public file links without expiry or password leak documents to anyone who finds the URL.' },
|
|
31
32
|
'field-history-tracking': { effort: 'quick', impact: 'Without field history, tampering with sensitive records can’t be reconstructed after an incident.' },
|
|
32
33
|
'data-classification': { effort: 'moderate', impact: 'Unclassified sensitive data can’t be protected or encrypted consistently, increasing exposure.' },
|
|
@@ -75,6 +76,7 @@ export const CHECK_META = {
|
|
|
75
76
|
'classic-sites': { effort: 'moderate', impact: 'Active classic Visualforce sites expose a second unauthenticated guest surface that the Experience Cloud checks never inspect.' },
|
|
76
77
|
'auth-providers': { effort: 'moderate', impact: 'Unvetted social/SAML identity providers with just-in-time provisioning can let attackers federate in or auto-create over-privileged users.' },
|
|
77
78
|
'guest-api-access': { effort: 'quick', impact: 'A guest user with API access can drive the raw REST/Bulk API, turning readable objects into scriptable mass extraction (and Hard Delete into irreversible destruction) without login.' },
|
|
79
|
+
'guest-user-visibility': { effort: 'quick', impact: 'A guest holding View All Users, or a public external OWD on User, hands unauthenticated visitors the full staff roster — a ready-made target list for phishing and credential stuffing against named admins.' },
|
|
78
80
|
'external-credentials': { effort: 'moderate', impact: 'Callouts with no or custom authentication can be spoofed or leak a static secret, exposing the integrated system and the data crossing it.' },
|
|
79
81
|
'login-anomaly': { effort: 'quick', impact: 'An account logging in from many distinct IPs signals credential sharing or compromise; caught late, it means an attacker already has a working session.' },
|
|
80
82
|
'session-hardening': { effort: 'quick', impact: 'Weak clickjack/CSRF/session-lock/XSS settings let attackers hijack authenticated sessions via framing, forged requests, or injected script.' },
|