filegrc 0.9.1 → 0.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/model/index.js +4 -4
- package/model/v7.json +10359 -0
- package/package.json +1 -1
- package/src/applicability-scope.js +211 -0
- package/src/audit-preparation.js +156 -20
- package/src/batch-review.js +40 -24
- package/src/cli.js +20 -7
- package/src/collection-review.js +16 -3
- package/src/collection-revision.js +29 -4
- package/src/collection-scope.js +110 -11
- package/src/document-activation.js +13 -1
- package/src/model-migration.js +224 -34
- package/src/obligations.js +128 -31
- package/src/policy-activation.js +5 -0
- package/src/program-lifecycle.js +1 -1
- package/src/program-path.js +1 -4
- package/src/program-readiness.js +20 -3
- package/src/reconciliation.js +15 -3
- package/src/server.js +2 -1
- package/src/setup.js +1 -1
- package/src/state.js +2 -1
- package/src/validate.js +25 -7
- package/src/web.js +121 -43
- package/src/workflow.js +7 -6
package/src/workflow.js
CHANGED
|
@@ -2,6 +2,7 @@ import { cp, mkdtemp, rm } from "node:fs/promises";
|
|
|
2
2
|
import { tmpdir } from "node:os";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { modelSupports } from "../model/index.js";
|
|
5
|
+
import { applicabilityReviewIsCurrent } from "./applicability-scope.js";
|
|
5
6
|
import { assessRequiredAppointments } from "./appointments.js";
|
|
6
7
|
import { assessSourceCoverageReadiness } from "./source-coverage.js";
|
|
7
8
|
import { coverageEnd, coverageStart } from "./coverage.js";
|
|
@@ -110,8 +111,8 @@ async function assessWorkflowUnmeasured(input, options = {}) {
|
|
|
110
111
|
audit.id,
|
|
111
112
|
await assessAuditPreparation(loaded, {
|
|
112
113
|
auditId: audit.id,
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
asOf,
|
|
115
|
+
generatedAt: evaluatedAt
|
|
115
116
|
})
|
|
116
117
|
])
|
|
117
118
|
));
|
|
@@ -363,7 +364,7 @@ function recordFinalizationFindings(loaded, program) {
|
|
|
363
364
|
if (incomplete) {
|
|
364
365
|
findings.push(finalizationFinding(record, incomplete));
|
|
365
366
|
}
|
|
366
|
-
for (const missing of finalizationFields(record, loaded.model)) {
|
|
367
|
+
for (const missing of finalizationFields(record, loaded.model, loaded.resources, program)) {
|
|
367
368
|
findings.push(fieldFinding(record, missing));
|
|
368
369
|
}
|
|
369
370
|
}
|
|
@@ -498,16 +499,16 @@ function recordFinalizationRequiredness(record, loaded, program) {
|
|
|
498
499
|
return "conditional";
|
|
499
500
|
}
|
|
500
501
|
|
|
501
|
-
function finalizationFields(record, model) {
|
|
502
|
+
function finalizationFields(record, model, resources, program) {
|
|
502
503
|
const fields = [];
|
|
503
504
|
const needsReview = ["requirement", "commitment", "complementary-control", "control"].includes(record.type)
|
|
504
505
|
&& model.resources[record.type]?.fields?.applicabilityReview
|
|
505
|
-
&& !record.applicabilityReview;
|
|
506
|
+
&& !applicabilityReviewIsCurrent(record.applicabilityReview, record, program, resources, model);
|
|
506
507
|
if (needsReview) {
|
|
507
508
|
fields.push({
|
|
508
509
|
field: "applicabilityReview",
|
|
509
510
|
requiredness: "required",
|
|
510
|
-
message: "Record the reviewed applicability decision, rationale, reviewer, and date. FileGRC records the current scope automatically."
|
|
511
|
+
message: "Record or refresh the reviewed applicability decision, rationale, reviewer, and date. FileGRC records the current material scope automatically."
|
|
511
512
|
});
|
|
512
513
|
}
|
|
513
514
|
if (record.type === "policy" && model.resources.policy?.fields?.programRole && !record.programRole) {
|