create-filegrc 0.9.2 → 0.11.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-filegrc",
3
- "version": "0.9.2",
3
+ "version": "0.11.0",
4
4
  "description": "Create a filegrc workspace for a SOC 2 program",
5
5
  "license": "MIT",
6
6
  "repository": {
package/src/defaults.js CHANGED
@@ -9,6 +9,7 @@ const OVERSIGHT_TEAM_ID = "team-security-risk-oversight";
9
9
  const INFORMATION_SECURITY_POLICY_ID = "policy-information-security";
10
10
  const RETENTION_SCHEDULE_ID = "document-data-retention-schedule";
11
11
  const SECURITY_PLAN_ID = "document-security-incident-recovery-plan";
12
+ const FILEGRC_INFORMATION_TYPE_ID = "information-type-grc-records";
12
13
  const FILEGRC_SOURCE_FAMILIES = [
13
14
  "training-acknowledgement",
14
15
  "exception-finding",
@@ -1117,6 +1118,10 @@ export function baselineRecordFiles(effectiveDate, starter = "security") {
1117
1118
  classificationId: "confidential",
1118
1119
  internetExposed: false,
1119
1120
  systemUses: [],
1121
+ informationUses: [{
1122
+ informationTypeId: FILEGRC_INFORMATION_TYPE_ID,
1123
+ processingOperations: ["collect", "store", "use", "share", "delete"]
1124
+ }],
1120
1125
  evidenceSourceKinds: FILEGRC_SOURCE_FAMILIES,
1121
1126
  evidenceOwnerIds: [POLICY_OWNER_APPOINTMENT_ID]
1122
1127
  };
@@ -1152,14 +1157,36 @@ export function baselineRecordFiles(effectiveDate, starter = "security") {
1152
1157
  ownerIds: [POLICY_OWNER_APPOINTMENT_ID],
1153
1158
  ...(filegrcManaged ? {
1154
1159
  collectionCadence: "Record work when it occurs and export the complete population for the audit period.",
1155
- retention: "Keep records for the period defined in the approved Data Retention Schedule.",
1160
+ retentionScheduleItemIds: [`retention-schedule-item-source-${sourceFamilyId}`],
1156
1161
  reconciliationMethod: "Export the complete filegrc source-family population, compare it with related in-scope records and Work Queue activity, and investigate omissions or duplicates.",
1157
1162
  validFrom: effectiveDate
1158
1163
  } : {})
1159
1164
  };
1160
1165
  });
1161
1166
 
1167
+ const informationType = {
1168
+ id: FILEGRC_INFORMATION_TYPE_ID,
1169
+ type: "information-type",
1170
+ title: "Governance, risk, compliance, and audit records",
1171
+ status: "active",
1172
+ classificationId: "confidential",
1173
+ description: "Structured program records, approvals, work history, and evidence indexes stored in the FileGRC repository."
1174
+ };
1175
+ const retentionScheduleItems = SOURCE_FAMILIES.map(([sourceFamilyId, title]) => ({
1176
+ id: `retention-schedule-item-source-${sourceFamilyId}`,
1177
+ type: "retention-schedule-item",
1178
+ title: `${title} retention review`,
1179
+ status: "planned",
1180
+ description: "Management must select the covered Information Types, cutoff, retention period, and disposition behavior before activation.",
1181
+ informationTypeIds: FILEGRC_SOURCE_FAMILIES.includes(sourceFamilyId) ? [FILEGRC_INFORMATION_TYPE_ID] : [],
1182
+ scopeResourceIds: [`source-coverage-${sourceFamilyId}`],
1183
+ scheduleDocumentId: RETENTION_SCHEDULE_ID,
1184
+ sourceResourceIds: [INFORMATION_SECURITY_POLICY_ID, RETENTION_SCHEDULE_ID],
1185
+ ownerIds: [POLICY_OWNER_APPOINTMENT_ID]
1186
+ }));
1187
+
1162
1188
  const foundation = [
1189
+ recordFile("information-types", informationType),
1163
1190
  recordFile("components", programRepository),
1164
1191
  recordFile("teams", team)
1165
1192
  ];
@@ -1173,6 +1200,7 @@ export function baselineRecordFiles(effectiveDate, starter = "security") {
1173
1200
  ...controlRecords.map((record) => recordFile("controls", record)),
1174
1201
  ...foundation,
1175
1202
  ...sourceCoverageRecords.map((record) => recordFile("source-coverage", record)),
1203
+ ...retentionScheduleItems.map((record) => recordFile("retention-schedule-items", record)),
1176
1204
  ...obligationRecords.map((record) => recordFile("obligations", record))
1177
1205
  ];
1178
1206
  }
package/src/index.js CHANGED
@@ -523,13 +523,13 @@ async function runCombinedSetup(target, input) {
523
523
  async function writeMinimalLockfile(target, name, versionRange) {
524
524
  const lock = {
525
525
  name,
526
- version: "0.9.2",
526
+ version: "0.11.0",
527
527
  lockfileVersion: 3,
528
528
  requires: true,
529
529
  packages: {
530
530
  "": {
531
531
  name,
532
- version: "0.9.2",
532
+ version: "0.11.0",
533
533
  dependencies: { filegrc: versionRange }
534
534
  }
535
535
  }
@@ -16,6 +16,7 @@ npx filegrc program-path --next --json
16
16
  npx filegrc guide risk-assessment --json
17
17
  npx filegrc list person --json
18
18
  npx filegrc program-readiness --summary --json
19
+ npx filegrc program-amendment SOURCE_RESOURCE_ID --json
19
20
  ```
20
21
 
21
22
  `program-path --next --json` gives agents the current step and first action. Use `--summary` for all five step statuses or `--current` for the current step’s page summaries, detailed guidance fields, commands, and next actions. The general guide lists every supported action and record type. A type guide adds the checks needed for that resource, including timing, required and conditional fields, current relationship candidates, JSON location, and Markdown slots.
@@ -57,7 +58,7 @@ Read `data/AGENTS.md` before changing records. More specific instructions inside
57
58
 
58
59
  The JSON and Markdown under `data/`, the installed model, policy content, and Git history are the inputs to FileGRC’s shared workflow calculation. Source files hold facts, decisions, relationships, dates, status, and evidence references. They do not each need a copy of the generic audit-readiness instructions or calculated TODO list.
59
60
 
60
- Use `npx filegrc workflow --json` for the complete derived checklist, named readiness assessments, blockers, Work Items, and recommended next action. `guide`, `list --workflow`, `get --workflow`, mutation previews, the HTTP API, and the browser consume the same calculation. Resolve a derived finding by changing its source facts, recording a reviewed applicability decision, accepting an allowed Exception, or completing authoritative assigned work. Never add a separate TODO file or UI-only completion flag for calculated work.
61
+ Start with `npx filegrc program-path --next --json` for the current step and next action. Use `npx filegrc workflow --json` when you need the complete derived checklist, named readiness assessments, blockers, and Work Items. `guide`, `list --workflow`, `get --workflow`, mutation previews, the HTTP API, and the browser consume the same calculation. Resolve a derived finding by changing its source facts, recording a reviewed applicability decision, accepting an allowed Exception, or completing authoritative assigned work. Never add a separate TODO file or UI-only completion flag for calculated work.
61
62
 
62
63
  FileGRC marks an item `blocked` only when named prerequisite records must be resolved first. A missing record, editable error, or management decision is `ready` when you can act on it now, even when it prevents a readiness assessment from passing.
63
64
 
@@ -98,15 +99,23 @@ Do not rewrite or remove committed records that explain prior audit periods. Clo
98
99
 
99
100
  `data/workspace.json` selects the model through `dataModelVersion`. The installed `filegrc` package owns the authoritative model. Do not copy or invent a local schema.
100
101
 
102
+ ### Standards alignment
103
+
104
+ FileGRC uses AICPA SOC 2 terms for the assurance subject matter and borrows useful structure from NIST OSCAL. A FileGRC System is the bounded system being governed or examined. Components are the logical capabilities that implement or support it, Assets are specific inventory items, Controls describe management's implementation, and Control Tests and Findings hold assessment work. Frameworks and Requirements act like catalog content, while the Program's reviewed applicability decisions perform the control-selection role associated with an OSCAL Profile.
105
+
106
+ This repository is not a native OSCAL document. Keep using the installed FileGRC model, its flat JSON records, human-readable IDs, companion Markdown, and typed relationships. Do not introduce OSCAL document nesting, UUIDs, back matter, or fields that `filegrc guide` does not support. Store an OSCAL identifier in `externalIds` when a real external mapping exists. Do not claim that this workspace or an audit packet is OSCAL-compatible unless an explicit FileGRC exporter validates that output against the supported official OSCAL schema.
107
+
108
+ Use standards terms only when their meanings match. Do not call a general program change a Profile or tailoring operation unless it selects or modifies control requirements. Do not put every adjustable policy value into a generic parameter object. Keep retention periods in the approved retention schedule, recurring cadences in Obligations, recovery objectives on Systems or Components, and other decisions in their model-defined records. Organization-specific decisions remain authoritative when starter or policy-library content changes.
109
+
101
110
  If the installed CLI reports that this workspace uses an unsupported model, start with:
102
111
 
103
112
  ```sh
104
- npx filegrc migrate --to-model 6 --preview --json
113
+ npx filegrc migrate --to-model 8 --preview --json
105
114
  ```
106
115
 
107
- Older workspaces migrate one version at a time. Review every preview’s automatic, review-required, and unsupported classifications before applying it with the same options and `--yes`. The v6 migration separates Training approval from activation, preserves existing active Training with a visible `legacy-v5` activation basis, and removes Training schedule fields because Obligations now own assignment timing.
116
+ Older workspaces migrate one version at a time. Review every preview’s automatic, review-required, and unsupported classifications before applying it with the same options and `--yes`. The v8 migration preserves legacy retention prose as notes, renames Component processing operations, and creates no retention periods or disposition behavior.
108
117
 
109
- The [model v6 upgrade guide](https://github.com/Alignbase/filegrc/blob/main/docs/upgrading-to-model-v6.md) explains the Training lifecycle and Obligation review.
118
+ The [model v8 upgrade guide](https://github.com/Alignbase/filegrc/blob/main/docs/upgrading-to-model-v8.md) explains the structured retention and mapping changes.
110
119
 
111
120
  Run these commands when working with records:
112
121
 
@@ -19,7 +19,7 @@ npm run serve
19
19
 
20
20
  Requires Node.js 20 or newer and Git.
21
21
 
22
- Existing model v5 workspaces must run `npx filegrc migrate --to-model 6 --preview --json` after installing a model v6 package. The migration gives Training separate approval and activation facts, preserves active model v5 Training with a visible legacy basis, and removes Training schedule fields because Obligations now own assignment timing. Review the result and confirm or create each Training Obligation in Step 3. Older workspaces migrate one model version at a time. See the [model v6 upgrade guide](https://github.com/Alignbase/filegrc/blob/main/docs/upgrading-to-model-v6.md).
22
+ Existing model v7 workspaces must run `npx filegrc migrate --to-model 8 --preview --json` after installing a model v8 package. The migration preserves legacy retention prose as notes and creates no retention periods or disposition behavior. Older workspaces migrate one model version at a time. See the [model v8 upgrade guide](https://github.com/Alignbase/filegrc/blob/main/docs/upgrading-to-model-v8.md).
23
23
 
24
24
  ## How it works
25
25
 
@@ -74,8 +74,8 @@ The browser is helpful, but it is not required. An agent can discover the model,
74
74
 
75
75
  ```sh
76
76
  npx filegrc program-path --next --json
77
- npx filegrc workflow --json
78
77
  npx filegrc reconcile --preview --json
78
+ npx filegrc workflow --json # full checklist when needed
79
79
  npx filegrc period-health --require-healthy --json
80
80
  npx filegrc review-applicability decisions.json --preview --json
81
81
  npx filegrc review-collection person --scaffold
@@ -8,16 +8,15 @@ Treat the installed model as the authority. Do not infer a schema from a nearby
8
8
 
9
9
  ```sh
10
10
  npx filegrc guide --json
11
- npx filegrc workflow --json
12
- npx filegrc reconcile --preview --json
13
11
  npx filegrc program-path --next --json
12
+ npx filegrc reconcile --preview --json
14
13
  npx filegrc types --json
15
14
  npx filegrc guide RESOURCE_TYPE --json
16
15
  npx filegrc list RESOURCE_TYPE --json
17
16
  npx filegrc search "TERM" --json
18
17
  ```
19
18
 
20
- Use `workflow --json` to get the shared assessments, complete checklist, Work Items, blockers, and recommended next action. Use `program-path --next --json` for the current lifecycle step. Use `guide` before any unfamiliar create or status transition. It reports required fields, fields required by a status, enum values, relationship types and candidates, Markdown slots, timing, and exact paths. Use `describe` only when you need the raw model definition.
19
+ Use `program-path --next --json` for the current lifecycle step. Use `workflow --json` when you need the full shared assessments, complete checklist, Work Items, and blockers. Use `guide` before any unfamiliar create or status transition. It reports required fields, fields required by a status, enum values, relationship types and candidates, Markdown slots, timing, and exact paths. Use `describe` only when you need the raw model definition.
21
20
 
22
21
  After changing a lifecycle fact directly, review `reconcile --preview --json`. A candidate asks whether the change represents a real policy event. Supply the actual event date or timestamp, departure risk when relevant, and explicit confirmation before applying it.
23
22
 
@@ -100,6 +99,8 @@ If `guide` marks a Markdown slot recommended, fill it before treating the delive
100
99
 
101
100
  When `guide` returns a collection review requirement, review the listed type-specific criteria and use `npx filegrc review-collection RESOURCE_TYPE --scaffold`. Fill the management conclusion, rationale, reviewer, and date, then preview and apply the payload. Do not invent `collectionRevision`; FileGRC calculates it from the current records and material Program scope. Any later change makes the confirmation stale and requires another review.
102
101
 
102
+ Use Retention Schedule Items as the structured rows of the Data Retention Schedule. Keep a row `planned` until management has approved its Information Types, scope, cutoff, period, disposition action, instructions, sources, approver, date, and reviewed source revisions. Run `npx filegrc program-readiness --json` after changing an information use, source-coverage record, Commitment, Policy, or other source. FileGRC may identify missing or stale decisions, but it must never infer an organization-specific period or deletion behavior.
103
+
103
104
  Store a relationship only on its authoritative record. Control Tests store `auditId`; Evidence Artifacts store `auditIds`; Commitments store `systemIds` and `controlIds`; Controls store `policyIds`, `requirementIds`, `systemIds`, `componentIds`, and `evidenceSourceComponentIds`; Risks store `controlIds`; Components store their `vendorId` and `systemUses`. Use `references` to inspect derived inbound links.
104
105
 
105
106
  Use explicit business dates. Git records when a file changed, but it does not replace `occurredOn`, `scheduledFor`, `completedOn`, `approvedOn`, or similar fields.
@@ -0,0 +1,10 @@
1
+ {
2
+ "id": "collection-review-information-type",
3
+ "type": "collection-review",
4
+ "title": "Information Type inventory review",
5
+ "status": "planned",
6
+ "resourceType": "information-type",
7
+ "scopeResourceIds": [
8
+ "program-soc-2"
9
+ ]
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "id": "collection-review-retention-schedule-item",
3
+ "type": "collection-review",
4
+ "title": "Retention schedule review",
5
+ "status": "planned",
6
+ "resourceType": "retention-schedule-item",
7
+ "scopeResourceIds": [
8
+ "program-soc-2"
9
+ ]
10
+ }
@@ -10,7 +10,7 @@ Set `workflowScope` to `program` for reusable plans, schedules, charters, proced
10
10
 
11
11
  Required program Documents follow `draft → approved → active`. Step 2 records the independent approver, `approvedOn`, and the exact `approvedContentRevisions`. After the linked requirements are implemented, Step 3 records `activationBasis: recorded`, the active Person in `activatedByIds`, `activatedOn`, `effectiveOn`, and the unchanged `activatedContentRevisions`. Approval and activation are separate writes even when they happen on the same calendar date. Editing bound Markdown requires a new approval and activation.
12
12
 
13
- Engagement Documents use the same separate events inside Step 5. Link each approved or active engagement Document to exactly one Audit, and do not reuse it as a Policy or Obligation document. Activate ready engagement Documents with `npx filegrc activate-documents --audit AUDIT_ID --scaffold`. Approval and activation facts become immutable after their event; return the Document to draft or approved and record a new lifecycle event when the content or decision changes. `activationBasis: legacy-v4` is only for historical audit Documents preserved by the model v4 migration. Do not use it for new work.
13
+ Engagement Documents use the same separate events inside Step 5. Link each approved or active engagement Document to exactly one Audit, and do not reuse it as a Policy or Obligation document. Activate ready engagement Documents with `npx filegrc activate-documents --audit AUDIT_ID --scaffold`. Approval and activation facts become immutable after their event; return the Document to draft or approved and record a new lifecycle event when the content or decision changes. `activationBasis: historical` is only for an imported historical audit Document whose source did not record approval and activation as separate events. Do not use it for new work.
14
14
 
15
15
  Keep resource links in the Document JSON and supporting records. In the Markdown, describe the underlying business fact in ordinary terms. For example, use “management's control matrix,” “authoritative-source export,” or “signed letter reference” instead of a FileGRC record type or ID.
16
16
 
@@ -16,7 +16,9 @@
16
16
  "acknowledgementRequired": false,
17
17
  "controlIds": [
18
18
  "control-data-classification-inventory",
19
- "control-data-retention-disposal"
19
+ "control-data-retention-disposal",
20
+ "control-logging-monitoring",
21
+ "control-backup-restoration"
20
22
  ],
21
23
  "classificationId": "internal",
22
24
  "proposedEffectiveOn": "{{effective_date}}",
@@ -8,15 +8,9 @@ Retention periods may come from law, contract, tax, audit, security, or a docume
8
8
 
9
9
  ## Schedule
10
10
 
11
- | Record class | System or location | Owner | Trigger | Retention | End-of-period action | Authority or reason |
12
- | --- | --- | --- | --- | --- | --- | --- |
13
- | Security logs for important Systems | [Complete before approval: Systems or Components] | [Complete before approval: owner] | Log event | [Confirm or replace proposed default before approval: 12 months, adjusted for investigation, contract, legal, audit, and risk needs] | [Complete before approval: disposal action] | [Complete before approval: authority or reason] |
14
- | Production backups or alternate recovery copies | [Complete before approval: Systems or Components] | [Complete before approval: owner] | Backup or recovery-copy creation | [Confirm or replace proposed default before approval: 30 days, adjusted to approved System recovery needs] | [Complete before approval: expiration or disposal action] | [Complete before approval: recovery need, commitment, or risk decision] |
15
- | SOC 2 Policies, Control records, and audit Evidence | Git repository and approved Evidence locations | Policy owner | End of the relevant audit period | [Complete before approval based on audit, contract, and legal needs] | Archive or securely delete | Audit and business requirements |
16
- | Customer and service records | [Complete before approval: Systems or Components] | [Complete before approval: owner] | [Complete before approval: trigger] | [Complete before approval: retention] | Delete or anonymize | Contract, law, and business need |
17
- | Incident and investigation records | Approved incident and Evidence Systems | Incident owner | Incident closure | [Complete before approval: retention] | Archive or securely delete | Legal, insurance, contract, and security needs |
18
-
19
- Add rows for each important data class in the System and Vendor inventories. A row is incomplete until it names the source System or Component, owner, trigger, period, disposal action, and authority. Remove each bracketed prompt only after replacing it with a reviewed fact.
11
+ The structured Retention Schedule Items linked to this document are its schedule rows. Each approved item must name the covered Information Types and operational scope, owner, cutoff, period, disposition action, instructions, and authority. Planned items are review prompts and are not approved retention behavior.
12
+
13
+ Management must cover important information used by Systems, Components, and Vendors, including security logs, backups or alternate recovery copies, governance records, audit evidence, customer and service records, and incident records when those classes exist. No starter period or disposition action is an approved organization value.
20
14
 
21
15
  ## Holds and exceptions
22
16
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "dataModelVersion": "6",
2
+ "dataModelVersion": "8",
3
3
  "id": "workspace",
4
4
  "type": "workspace",
5
5
  "title": "{{program_title}}",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "{{project_name}}",
3
- "version": "0.9.2",
3
+ "version": "0.11.0",
4
4
  "private": true,
5
5
  "description": "filegrc workspace for a SOC 2 program",
6
6
  "type": "module",