filegrc 0.7.0 → 0.8.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/README.md +14 -6
- package/model/index.js +21 -4
- package/model/v4.json +97 -6
- package/model/v5.json +10233 -0
- package/package.json +4 -2
- package/src/agent.js +4 -3
- package/src/audit-preparation.js +635 -81
- package/src/audit-transition.js +8 -2
- package/src/batch-review.js +21 -11
- package/src/cli.js +117 -12
- package/src/collection-review.js +4 -3
- package/src/collection-scope.js +4 -3
- package/src/document-activation.js +145 -0
- package/src/evidence-packet.js +393 -106
- package/src/external-reviewer.js +5 -4
- package/src/files.js +194 -35
- package/src/git.js +106 -10
- package/src/index.js +10 -1
- package/src/model-migration.js +218 -7
- package/src/obligations.js +14 -11
- package/src/policy-library/information-security-policy-v2.md +290 -0
- package/src/policy-library.js +827 -0
- package/src/program-lifecycle.js +93 -3
- package/src/program-path.js +14 -9
- package/src/program-readiness.js +306 -75
- package/src/program.js +5 -3
- package/src/reconciliation.js +3 -2
- package/src/server.js +29 -7
- package/src/setup.js +25 -5
- package/src/soc2.js +228 -0
- package/src/state.js +8 -0
- package/src/validate.js +168 -14
- package/src/web.js +257 -35
- package/src/workflow.js +107 -44
- package/src/workspace.js +5 -0
package/README.md
CHANGED
|
@@ -36,13 +36,21 @@ npx filegrc evidence-packet --start 2026-01-01 --end 2026-06-30 --audit audit-id
|
|
|
36
36
|
|
|
37
37
|
## Upgrade an existing workspace
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
Package updates may include optional starter Policy and Control revisions. Review them without writing:
|
|
40
40
|
|
|
41
41
|
```sh
|
|
42
|
-
npx filegrc
|
|
42
|
+
npx filegrc policy-library
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
The command shows an exact diff only when the current text still matches the prior starter default. It skips customized, approved, active, superseded, and retired Policy content. Accept one named proposal revision only with the command printed by the review, which includes `--accept`, `--proposal-revision`, and `--yes`. Acceptance fails if the proposal changed after review. It changes only the listed defaults and does not approve a Policy, activate it, or mark a Control implemented.
|
|
46
|
+
|
|
47
|
+
The normal runtime uses data model v5. Start a model v4 upgrade with a read-only preview:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
npx filegrc migrate --to-model 5 --preview --json
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Review every automatic, review-required, and unsupported item. Model v4 combined Document approval and activation, so the migration preserves approval facts, assigns program or engagement scope, and moves active Documents that still need a distinct cutover to approved without inventing an activation actor, date, or revision. It preserves historical management Documents from issued or completed Audits with a visible legacy basis. Resolve unsupported items before applying the same migration with `--yes`. The [model v5 upgrade guide](https://github.com/Alignbase/filegrc/blob/main/docs/upgrading-to-model-v5.md) documents the migration and required Step 3 review.
|
|
46
54
|
|
|
47
55
|
A model v2 workspace must migrate to v3 first:
|
|
48
56
|
|
|
@@ -50,7 +58,7 @@ A model v2 workspace must migrate to v3 first:
|
|
|
50
58
|
npx filegrc migrate --to-model 3 --preview --json
|
|
51
59
|
```
|
|
52
60
|
|
|
53
|
-
The migration writes one atomic batch, validates model v3, changes no Git history, and is safe to rerun. The [model v3 upgrade guide](https://github.com/Alignbase/filegrc/blob/main/docs/upgrading-to-model-v3.md) explains every migration class and the review that follows. Apply it before previewing model v4.
|
|
61
|
+
The migration writes one atomic batch, validates model v3, changes no Git history, and is safe to rerun. The [model v3 upgrade guide](https://github.com/Alignbase/filegrc/blob/main/docs/upgrading-to-model-v3.md) explains every migration class and the review that follows. Apply it before previewing model v4, then model v5.
|
|
54
62
|
|
|
55
63
|
A model v1 workspace must migrate to v2 first:
|
|
56
64
|
|
|
@@ -58,7 +66,7 @@ A model v1 workspace must migrate to v2 first:
|
|
|
58
66
|
npx filegrc migrate --to-model 2 --preview --json
|
|
59
67
|
```
|
|
60
68
|
|
|
61
|
-
Follow the [model v2 upgrade guide](https://github.com/Alignbase/filegrc/blob/main/docs/upgrading-to-model-v2.md), then run the model v3 and
|
|
69
|
+
Follow the [model v2 upgrade guide](https://github.com/Alignbase/filegrc/blob/main/docs/upgrading-to-model-v2.md), then run the model v3, v4, and v5 previews in order.
|
|
62
70
|
|
|
63
71
|
`filegrc serve --help` prints bind, port, environment, and safety options without starting the server. The editable server prefers `127.0.0.1:8787` and chooses another available port when that port is occupied. Set `FILEGRC_HOST`, `FILEGRC_PORT`, or the matching flags when needed. In trunk mode, browser saves synchronize, commit, and push from the authoritative branch. Use `--allow-non-authoritative-writes` for local development in a task checkout; the override never commits or pushes.
|
|
64
72
|
|
|
@@ -68,7 +76,7 @@ Follow the [model v2 upgrade guide](https://github.com/Alignbase/filegrc/blob/ma
|
|
|
68
76
|
|
|
69
77
|
`filegrc program-readiness` reports whether management can start a candidate Type 2 period. Add `--summary --json` for compact stage counts and next actions, or omit `--summary` for every readiness item. Use `--require-ready` in automation. Pass `--program PROGRAM_ID` when more than one active Program exists. The command does not require an Audit ID or CPA firm.
|
|
70
78
|
|
|
71
|
-
|
|
79
|
+
Step 2 completes and independently approves the intended values and exact revisions of required program plans and schedules. Step 3 implements their linked requirements and uses `filegrc activate-documents --scaffold` to record the active Person, separate activation date, and revision. Control implementation also checks expected evidence, authoritative source Components, and source readiness. During Step 4, create Evidence only when operation produces a real record or artifact. Keep engagement-scoped terms, management assertions, representation letters, and other audit-specific Documents in Step 5. Link each one to one Audit and use `filegrc activate-documents --audit AUDIT_ID --scaffold` after approval. Model v5 evidence packets export both lifecycle events and their exact revisions in `document-lifecycle-index.csv`.
|
|
72
80
|
|
|
73
81
|
`filegrc obligations` shows recurring work and a task-level preview for each Policy Event, including owners, deadlines, and requested proof. `filegrc trigger` adds the event and all of its Action Items to the Work Queue atomically, then prints the created task IDs and deadlines.
|
|
74
82
|
|
package/model/index.js
CHANGED
|
@@ -1,14 +1,31 @@
|
|
|
1
1
|
import { readFileSync } from "node:fs";
|
|
2
2
|
|
|
3
|
-
export const ACTIVE_MODEL_VERSION = "
|
|
4
|
-
export const SUPPORTED_MODEL_VERSIONS = Object.freeze(["2", "3", ACTIVE_MODEL_VERSION]);
|
|
3
|
+
export const ACTIVE_MODEL_VERSION = "5";
|
|
4
|
+
export const SUPPORTED_MODEL_VERSIONS = Object.freeze(["2", "3", "4", ACTIVE_MODEL_VERSION]);
|
|
5
|
+
export const MODEL_CAPABILITY_VERSIONS = Object.freeze({
|
|
6
|
+
"guided-workflow": 3,
|
|
7
|
+
"program-scope": 4,
|
|
8
|
+
"component-sources": 4,
|
|
9
|
+
"evidence-artifacts": 4,
|
|
10
|
+
"governed-document-activation": 5,
|
|
11
|
+
"document-workflow-scope": 5
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export function modelSupports(modelOrVersion, capability) {
|
|
15
|
+
const introduced = MODEL_CAPABILITY_VERSIONS[capability];
|
|
16
|
+
if (!introduced) throw new Error(`Unknown model capability "${capability}".`);
|
|
17
|
+
const version = typeof modelOrVersion === "object"
|
|
18
|
+
? modelOrVersion?.modelVersion
|
|
19
|
+
: modelOrVersion;
|
|
20
|
+
return Number(version || 0) >= introduced;
|
|
21
|
+
}
|
|
5
22
|
|
|
6
23
|
export function loadModel(version = ACTIVE_MODEL_VERSION) {
|
|
7
24
|
const requested = String(version);
|
|
8
25
|
if (!SUPPORTED_MODEL_VERSIONS.includes(requested)) {
|
|
9
|
-
const migrationTarget = requested === "1" ? "2" : requested === "2" ? "3" : "4";
|
|
26
|
+
const migrationTarget = requested === "1" ? "2" : requested === "2" ? "3" : requested === "3" ? "4" : "5";
|
|
10
27
|
throw new Error(
|
|
11
|
-
`Unsupported data model version "${requested}". This filegrc release supports models v2, v3, and
|
|
28
|
+
`Unsupported data model version "${requested}". This filegrc release supports models v2, v3, v4, and v5. `
|
|
12
29
|
+ `Run \`npx filegrc migrate --to-model ${migrationTarget} --preview --json\` from the workspace root.`
|
|
13
30
|
);
|
|
14
31
|
}
|
package/model/v4.json
CHANGED
|
@@ -723,7 +723,9 @@
|
|
|
723
723
|
],
|
|
724
724
|
"obligationActivityTypes": [
|
|
725
725
|
"training",
|
|
726
|
-
"performance-review"
|
|
726
|
+
"performance-review",
|
|
727
|
+
"workforce-review",
|
|
728
|
+
"role-training"
|
|
727
729
|
]
|
|
728
730
|
},
|
|
729
731
|
"required": [
|
|
@@ -1393,6 +1395,11 @@
|
|
|
1393
1395
|
"guidance": {
|
|
1394
1396
|
"policyBasis": "Policies rely on governed documents for detailed plans, procedures, charters, and reports. Git preserves the approved text and its revision history.",
|
|
1395
1397
|
"cadence": "Follow the linked review Obligation. Starter governed documents are reviewed at least annually and after material changes or use, with an approver who is separate from the owner.",
|
|
1398
|
+
"reviewPoints": [
|
|
1399
|
+
"Write companion Markdown as a standalone company artifact. Keep FileGRC commands, record-entry instructions, readiness states, relationship IDs, and starter-library mechanics in guides and calculated work unless FileGRC itself is the document's subject.",
|
|
1400
|
+
"Replace every bracketed prompt with a reviewed fact before approval, activation, signature, or delivery.",
|
|
1401
|
+
"Describe the business fact in ordinary terms and keep resource relationships in the Document record and supporting records."
|
|
1402
|
+
],
|
|
1396
1403
|
"sourceResourceIds": [
|
|
1397
1404
|
"policy-information-security",
|
|
1398
1405
|
"document-security-incident-recovery-plan"
|
|
@@ -1636,6 +1643,11 @@
|
|
|
1636
1643
|
"policyBasis": "The information security policy requires retained proof from authoritative Components when FileGRC operating records do not contain the full result.",
|
|
1637
1644
|
"cadence": "Create an Evidence Artifact only for a real retained artifact or approved reference. Identify its source Component or source records, Controls, collection and verification facts, coverage, revision, and classification.",
|
|
1638
1645
|
"emptyState": "No Evidence Artifacts have been collected. Add one only when a real retained artifact or approved external reference exists.",
|
|
1646
|
+
"reviewPoints": [
|
|
1647
|
+
"Use artifactKind signed-record and artifactSubtype signed-management-representation for the fixed signed management representation letter.",
|
|
1648
|
+
"For a signed management representation, record the actual signing timestamp in businessEventAt; collectedOn records when FileGRC received the artifact, not when management signed it.",
|
|
1649
|
+
"Use artifactKind third-party-report and artifactSubtype soc2-report for the final report issued by the CPA firm, and record the report's actual issuance timestamp in sourceGeneratedAt."
|
|
1650
|
+
],
|
|
1639
1651
|
"sourceResourceIds": [
|
|
1640
1652
|
"policy-information-security"
|
|
1641
1653
|
]
|
|
@@ -2656,7 +2668,7 @@
|
|
|
2656
2668
|
"cadence": "A Control may be implemented while its governing Policy is approved but inactive. Before marking it implemented, record its owner, actual procedure in Record Markdown, bounded System scope, operation pattern, authoritative evidence-source Components, implementation date, and enabled calendar or event schedules. Confirm each source Component is active, has the evidence role required by the Control family and current access owners, and includes repeatable retrieval instructions in Record Markdown. Enabled schedules remain dormant until their governing Policies are active and effective.",
|
|
2657
2669
|
"reviewPoints": [
|
|
2658
2670
|
"Confirm the Control is needed for the applicable Requirements, customer Commitments, and current service boundary.",
|
|
2659
|
-
"Confirm the procedure describes what people actually do.",
|
|
2671
|
+
"Confirm the procedure describes what people actually do, and keep starter-selection and FileGRC record-entry instructions out of the Control statement and activity. A Control may name FileGRC when FileGRC is an actual operating Component or evidence source.",
|
|
2660
2672
|
"Use a not-applicable, external, or zero-population conclusion only when it is factually true for the current scope."
|
|
2661
2673
|
],
|
|
2662
2674
|
"sourceResourceIds": [
|
|
@@ -2664,7 +2676,8 @@
|
|
|
2664
2676
|
],
|
|
2665
2677
|
"obligationActivityTypes": [
|
|
2666
2678
|
"risk-assessment",
|
|
2667
|
-
"policy-review"
|
|
2679
|
+
"policy-review",
|
|
2680
|
+
"control-design-review"
|
|
2668
2681
|
]
|
|
2669
2682
|
},
|
|
2670
2683
|
"required": [
|
|
@@ -4108,6 +4121,11 @@
|
|
|
4108
4121
|
"guidance": {
|
|
4109
4122
|
"policyBasis": "The information security policy requires security training and added role-specific instruction when a person’s responsibilities or data access warrant it.",
|
|
4110
4123
|
"cadence": "Assign security training at onboarding, complete it within 30 days, repeat at least annually, and reassign after relevant material changes or incidents.",
|
|
4124
|
+
"reviewPoints": [
|
|
4125
|
+
"Write workforce-facing material as standalone company training. Keep FileGRC commands, record-entry instructions, and data-model terms in guides and assignment records.",
|
|
4126
|
+
"State required behavior without implying that every user needs a paid product or that customer MFA applies without an approved requirement.",
|
|
4127
|
+
"Tie each completion to the exact training revision the person reviewed."
|
|
4128
|
+
],
|
|
4111
4129
|
"sourceResourceIds": [
|
|
4112
4130
|
"policy-information-security"
|
|
4113
4131
|
],
|
|
@@ -6030,10 +6048,10 @@
|
|
|
6030
6048
|
"collection": "penetration-tests",
|
|
6031
6049
|
"description": "One internal or external penetration test, including provider, scope, period, method, result, affected Systems, Evidence, Vulnerabilities, Findings, and review.",
|
|
6032
6050
|
"guidance": {
|
|
6033
|
-
"policyBasis": "The information security policy requires
|
|
6034
|
-
"cadence": "
|
|
6051
|
+
"policyBasis": "The information security policy requires management to decide whether penetration testing is needed from exposure, material changes, customer commitments, technical capability, and risk, then track confirmed findings when testing is performed.",
|
|
6052
|
+
"cadence": "Use the cadence approved in the applicable Control, customer commitment, or risk decision. Review applicability at least annually and after material attack-surface or architecture changes; the review may conclude that no penetration test is required.",
|
|
6035
6053
|
"reviewPoints": [
|
|
6036
|
-
"Confirm the tester
|
|
6054
|
+
"Confirm the testing decision, tester independence when required, scope, method, and cadence match the approved reason for testing.",
|
|
6037
6055
|
"Confirm the report supports the recorded result.",
|
|
6038
6056
|
"Confirm every issue has remediation, an accepted exception, or verified closure."
|
|
6039
6057
|
],
|
|
@@ -6696,6 +6714,18 @@
|
|
|
6696
6714
|
"items": "object",
|
|
6697
6715
|
"itemObjectType": "audit-subservice-treatment",
|
|
6698
6716
|
"label": "Subservice treatments"
|
|
6717
|
+
},
|
|
6718
|
+
"subserviceConclusion": {
|
|
6719
|
+
"type": "enum",
|
|
6720
|
+
"values": [
|
|
6721
|
+
"not-applicable",
|
|
6722
|
+
"identified"
|
|
6723
|
+
],
|
|
6724
|
+
"label": "Subservice conclusion"
|
|
6725
|
+
},
|
|
6726
|
+
"subserviceConclusionRationale": {
|
|
6727
|
+
"type": "string",
|
|
6728
|
+
"label": "Subservice conclusion rationale"
|
|
6699
6729
|
}
|
|
6700
6730
|
},
|
|
6701
6731
|
"listFields": [
|
|
@@ -6707,6 +6737,8 @@
|
|
|
6707
6737
|
],
|
|
6708
6738
|
"formFields": [
|
|
6709
6739
|
"coverage",
|
|
6740
|
+
"subserviceConclusion",
|
|
6741
|
+
"subserviceConclusionRationale",
|
|
6710
6742
|
"subserviceTreatments"
|
|
6711
6743
|
]
|
|
6712
6744
|
},
|
|
@@ -7376,7 +7408,9 @@
|
|
|
7376
7408
|
"log-review",
|
|
7377
7409
|
"network-review",
|
|
7378
7410
|
"continuity-review",
|
|
7411
|
+
"control-design-review",
|
|
7379
7412
|
"performance-review",
|
|
7413
|
+
"workforce-review",
|
|
7380
7414
|
"personal-device-approval",
|
|
7381
7415
|
"security-scan"
|
|
7382
7416
|
],
|
|
@@ -9220,6 +9254,24 @@
|
|
|
9220
9254
|
"component"
|
|
9221
9255
|
]
|
|
9222
9256
|
},
|
|
9257
|
+
"control-design-review": {
|
|
9258
|
+
"title": "Control design and evidence-path review",
|
|
9259
|
+
"completionType": "control-activity",
|
|
9260
|
+
"completionResourceTypes": [
|
|
9261
|
+
"control-activity"
|
|
9262
|
+
],
|
|
9263
|
+
"recurrenceModes": [
|
|
9264
|
+
"calendar",
|
|
9265
|
+
"event"
|
|
9266
|
+
],
|
|
9267
|
+
"scopeResourceTypes": [
|
|
9268
|
+
"control",
|
|
9269
|
+
"program",
|
|
9270
|
+
"system",
|
|
9271
|
+
"component"
|
|
9272
|
+
],
|
|
9273
|
+
"completionProfile": "control-design-review"
|
|
9274
|
+
},
|
|
9223
9275
|
"continuity-review": {
|
|
9224
9276
|
"title": "Continuity review",
|
|
9225
9277
|
"completionType": "control-activity",
|
|
@@ -9425,6 +9477,21 @@
|
|
|
9425
9477
|
],
|
|
9426
9478
|
"completionProfile": "performance-review"
|
|
9427
9479
|
},
|
|
9480
|
+
"workforce-review": {
|
|
9481
|
+
"title": "Workforce screening and competence review",
|
|
9482
|
+
"completionType": "control-activity",
|
|
9483
|
+
"completionResourceTypes": [
|
|
9484
|
+
"control-activity"
|
|
9485
|
+
],
|
|
9486
|
+
"recurrenceModes": [
|
|
9487
|
+
"calendar",
|
|
9488
|
+
"event"
|
|
9489
|
+
],
|
|
9490
|
+
"scopeResourceTypes": [
|
|
9491
|
+
"person"
|
|
9492
|
+
],
|
|
9493
|
+
"completionProfile": "workforce-review"
|
|
9494
|
+
},
|
|
9428
9495
|
"personal-device-approval": {
|
|
9429
9496
|
"title": "Personal device approval",
|
|
9430
9497
|
"completionType": "control-activity",
|
|
@@ -10022,6 +10089,18 @@
|
|
|
10022
10089
|
"completedAt"
|
|
10023
10090
|
]
|
|
10024
10091
|
},
|
|
10092
|
+
"control-design-review": {
|
|
10093
|
+
"title": "Control design and evidence-path review",
|
|
10094
|
+
"resourceType": "control-activity",
|
|
10095
|
+
"requiredFacts": [
|
|
10096
|
+
"performerIds",
|
|
10097
|
+
"scopeResourceIds",
|
|
10098
|
+
"method",
|
|
10099
|
+
"result",
|
|
10100
|
+
"reviewerIds",
|
|
10101
|
+
"completedAt"
|
|
10102
|
+
]
|
|
10103
|
+
},
|
|
10025
10104
|
"performance-review": {
|
|
10026
10105
|
"title": "Performance review",
|
|
10027
10106
|
"resourceType": "control-activity",
|
|
@@ -10034,6 +10113,18 @@
|
|
|
10034
10113
|
"completedAt"
|
|
10035
10114
|
]
|
|
10036
10115
|
},
|
|
10116
|
+
"workforce-review": {
|
|
10117
|
+
"title": "Workforce screening and competence review",
|
|
10118
|
+
"resourceType": "control-activity",
|
|
10119
|
+
"requiredFacts": [
|
|
10120
|
+
"performerIds",
|
|
10121
|
+
"scopeResourceIds",
|
|
10122
|
+
"method",
|
|
10123
|
+
"result",
|
|
10124
|
+
"reviewerIds",
|
|
10125
|
+
"completedAt"
|
|
10126
|
+
]
|
|
10127
|
+
},
|
|
10037
10128
|
"personal-device-approval": {
|
|
10038
10129
|
"title": "Personal-device approval",
|
|
10039
10130
|
"resourceType": "control-activity",
|