Skip to content

feat: add NIST OSCAL 1.2.3 assessment-results output format - #1109

Open
AAH20 wants to merge 47 commits into
turbot:mainfrom
AAH20:feat/oscal-output-format
Open

feat: add NIST OSCAL 1.2.3 assessment-results output format#1109
AAH20 wants to merge 47 commits into
turbot:mainfrom
AAH20:feat/oscal-output-format

Conversation

@AAH20

@AAH20 AAH20 commented Aug 18, 2026

Copy link
Copy Markdown

What

Adds oscal.json as a new export/output format, alongside the existing csv, html, json, md, nunit3.xml, asff.json.

Why

Powerpipe's export formats don't include OSCAL (confirmed by code search — zero references to "oscal" anywhere in the repo). OSCAL 1.2.3 is the NIST-standard machine-readable assessment-results format; Prowler, DefectDojo, and IBM's compliance-trestle all already support it. Powerpipe is the most broadly-used open compliance-as-code tool across the providers it supports (AWS, GCP, Azure, GitHub, and more), so this closes a real, verified gap rather than a guessed one.

How

Follows the exact existing pattern for adding a format: a new internal/controldisplay/templates/oscal.json/ directory (output.tmpl + version.json), matching how asff.json maps control results into another external standardized schema. No registry changes needed — formats are auto-discovered from the templates directory.

Mapping from Powerpipe's five control-row statuses to OSCAL:

  • Every row becomes an Observation (uuid, description, methods, collected — all schema-required, all present).
  • Only "alarm" (failed) rows also become a Finding. "error"/"skip"/"info" are inconclusive, not failures — matching the same honesty rule used in prowler#12475's OSCAL exporter, they're never asserted satisfied/not-satisfied, Observation only.
  • finding.target uses type: "objective-id" and target-id = the control's FullName (a dotted Powerpipe control name satisfies the OSCAL TokenDatatype pattern; a raw uuid would not).
  • observations/findings are omitted entirely when empty rather than emitted as [], since both have schema minItems: 1.

One small Go change: added "uuidv4" to the sprig function whitelist in template_functions.go — OSCAL requires real uuid fields the existing whitelist had no way to produce.

Verification

Downloaded the real, official OSCAL 1.2.3 schema from the usnistgov/OSCAL v1.2.3 release (not assumed). Added formatter_oscal_test.go, which renders the template through the actual TemplateFormatter.Format() code path — real Go structs (ExecutionTree/ControlRun/ResultRow), no HCL parsing needed since ControlRun exposes FullName/Title/Description/Severity directly — against two hand-built trees: one mixed ok+alarm, one all-ok. Both render successfully and validate with zero errors against the official schema; the all-ok case specifically confirms "findings" is genuinely absent, not [].

gofmt clean, go vet clean, full internal/controldisplay package test suite passes.

Test plan

  • go test ./internal/controldisplay/... — all pass
  • Rendered output validated against the official NIST OSCAL 1.2.3 JSON schema (0 errors, both mixed and all-ok cases)
  • gofmt -l / go vet clean

pskrbasu and others added 30 commits February 27, 2026 17:46
…evelop

# Conflicts:
#	.github/workflows/01-powerpipe-release.yaml
#	.github/workflows/11-test-acceptance.yaml
#	go.mod
#	go.sum
#	ui/dashboard/package.json
#	ui/dashboard/yarn.lock
Resolve workflow conflicts by keeping the newer docker/setup-buildx-action pin (v3.12.0) from main.
This reverts commit 68f0681, reversing
changes made to 43f90aa.
…8.6 (turbot#1046)

Bumps [github.com/hashicorp/go-getter](https://github.com/hashicorp/go-getter) from 1.7.9 to 1.8.6.
- [Release notes](https://github.com/hashicorp/go-getter/releases)
- [Commits](hashicorp/go-getter@v1.7.9...v1.8.6)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/go-getter
  dependency-version: 1.8.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
turbot#1045)

Bumps [lodash](https://github.com/lodash/lodash) from 4.17.23 to 4.18.1.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.23...4.18.1)

---
updated-dependencies:
- dependency-name: lodash
  dependency-version: 4.18.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…turbot#1055)

Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.0.3 to 3.1.2.
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](fastify/fast-uri@v3.0.3...v3.1.2)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…bot#1056)

Bumps [@babel/plugin-transform-modules-systemjs](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-modules-systemjs) from 7.25.9 to 7.29.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.29.4/packages/babel-plugin-transform-modules-systemjs)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-modules-systemjs"
  dependency-version: 7.29.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump lodash-es from 4.17.23 to 4.18.1 in /ui/dashboard

Resolves CVE-2026-4800. turbot#1045 bumped lodash but left lodash-es at 4.17.23,
which is within the vulnerable range (<= 4.17.23), fixed in 4.18.1. Pinned
via the resolutions block; minor bump, no API changes.

* Update implicit-workspace test fixture: redhood-aaa -> turbot-silverwater

The database-precedence implicit-workspace tests assert the query reached the
turbot-ops/clitesting Pipes workspace by matching its AWS account alias. That
workspace's AWS connection now resolves to alias turbot-silverwater; the prior
redhood-aaa value was stale. Behaviour under test (workspace routing) unchanged.
…ard (turbot#1075)

Bumps [shell-quote](https://github.com/ljharb/shell-quote) from 1.8.1 to 1.8.4.
- [Changelog](https://github.com/ljharb/shell-quote/blob/main/CHANGELOG.md)
- [Commits](ljharb/shell-quote@v1.8.1...v1.8.4)

---
updated-dependencies:
- dependency-name: shell-quote
  dependency-version: 1.8.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
….0 (turbot#1058)

Bumps [github.com/go-git/go-billy/v5](https://github.com/go-git/go-billy) from 5.8.0 to 5.9.0.
- [Release notes](https://github.com/go-git/go-billy/releases)
- [Commits](go-git/go-billy@v5.8.0...v5.9.0)

---
updated-dependencies:
- dependency-name: github.com/go-git/go-billy/v5
  dependency-version: 5.9.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
pipe-fittings v2.9.2 makes the mod installer tolerate read-only git pack
files, which unblocks the go-git bump to v5.19.1 (go-git >= v5.17 writes
pack files read-only and previously broke mod re-install/upgrade with
"permission denied").

Clears CVE-2026-45022, CVE-2026-34165 and CVE-2026-33762, and removes the
go-git v5.16.5 pin. Closes turbot#1040. Supersedes turbot#1067.
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.7.29 to 1.7.33.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](containerd/containerd@v1.7.29...v1.7.33)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-version: 1.7.33
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
turbot#1079)

Bumps [form-data](https://github.com/form-data/form-data) from 3.0.4 to 3.0.5.
- [Release notes](https://github.com/form-data/form-data/releases)
- [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md)
- [Commits](form-data/form-data@v3.0.4...v3.0.5)

---
updated-dependencies:
- dependency-name: form-data
  dependency-version: 3.0.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ot#1087)

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.50.0 to 0.52.0.
- [Commits](golang/crypto@v0.50.0...v0.52.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.52.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…1086)

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.54.0 to 0.55.0.
- [Commits](golang/net@v0.54.0...v0.55.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.55.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [websocket-driver](https://github.com/faye/websocket-driver-node) from 0.7.4 to 0.7.5.
- [Changelog](https://github.com/faye/websocket-driver-node/blob/main/CHANGELOG.md)
- [Commits](faye/websocket-driver-node@0.7.4...0.7.5)

---
updated-dependencies:
- dependency-name: websocket-driver
  dependency-version: 0.7.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…t#1081)

Bumps [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) from 2.0.9 to 2.0.10.
- [Release notes](https://github.com/chimurai/http-proxy-middleware/releases)
- [Changelog](https://github.com/chimurai/http-proxy-middleware/blob/v2.0.10/CHANGELOG.md)
- [Commits](chimurai/http-proxy-middleware@v2.0.9...v2.0.10)

---
updated-dependencies:
- dependency-name: http-proxy-middleware
  dependency-version: 2.0.10
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.26.0 to 7.29.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.29.7/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-version: 7.29.7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [launch-editor](https://github.com/vitejs/launch-editor) from 2.12.0 to 2.14.1.
- [Commits](vitejs/launch-editor@v2.12.0...v2.14.1)

---
updated-dependencies:
- dependency-name: launch-editor
  dependency-version: 2.14.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.9 to 1.16.0.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.15.9...v1.16.0)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-version: 1.16.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…rbot#1078)

Bumps [ws](https://github.com/websockets/ws) from 7.5.10 to 7.5.11.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](websockets/ws@7.5.10...7.5.11)

---
updated-dependencies:
- dependency-name: ws
  dependency-version: 7.5.11
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…stream (turbot#1073)

Bumps [github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream](https://github.com/aws/aws-sdk-go-v2) from 1.7.7 to 1.7.8.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](aws/aws-sdk-go-v2@service/m2/v1.7.7...service/m2/v1.7.8)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream
  dependency-version: 1.7.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#1074)

Bumps [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2) from 1.97.1 to 1.97.3.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](aws/aws-sdk-go-v2@service/s3/v1.97.1...service/s3/v1.97.3)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/s3
  dependency-version: 1.97.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Clears CVE-2026-50151, CVE-2026-50162, CVE-2026-50163, CVE-2026-48978 and
GHSA-vh4v-2xq2-g5cg. oras-go is an indirect dependency, so the newer version
is pinned directly in go.mod; x/sync moves to the minimum oras-go 2.6.2
requires.
… js-yaml, qs, tar) (turbot#1089)

The ui/dashboard resolutions block pinned versions that have since been
CVE-flagged; Dependabot cannot bump pinned resolutions. Refresh each pin
within its major:

- ws 8.18.3 -> 8.21.1 (scoped to the ^8 ranges; ws@7 untouched) - CVE-2026-48779, CVE-2026-45736
- webpack-dev-server 5.2.1 -> 5.2.5 - CVE-2026-6402, CVE-2026-9595
- js-yaml 4.1.1 -> 4.2.0 - CVE-2026-53550
- qs 6.14.2 -> 6.15.3 - CVE-2026-8723
- tar 7.5.11 -> 7.5.16 - CVE-2026-53655
dependabot Bot and others added 17 commits July 27, 2026 14:49
…urbot#1093)

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.79.3 to 1.82.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.79.3...v1.82.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-version: 1.82.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…turbot#1094)

Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.2 to 3.1.4.
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](fastify/fast-uri@v3.1.2...v3.1.4)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [shell-quote](https://github.com/ljharb/shell-quote) from 1.8.4 to 1.10.0.
- [Changelog](https://github.com/ljharb/shell-quote/blob/main/CHANGELOG.md)
- [Commits](ljharb/shell-quote@v1.8.4...v1.10.0)

---
updated-dependencies:
- dependency-name: shell-quote
  dependency-version: 1.10.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…-expansion, webpack-dev-server (turbot#1096)

* Bump tar, ip-address, and react-router pins in the dashboard UI

- tar resolution 7.5.16 -> 7.5.22: clears the new tar advisory batch
  (CVE-2026-59873 critical, CVE-2026-59874, CVE-2026-59875, CVE-2026-59871)
- ip-address resolution 10.3.1 (was transitive 9.0.5): clears CVE-2026-42338
- react-router-dom 6.30.2 -> 6.30.4 (with @remix-run/router 1.23.3):
  clears CVE-2026-40181 on react-router

All three are transitive or patch-level moves; dashboard yarn build verified
locally.

* Pin postcss, brace-expansion, and webpack-dev-server in the dashboard UI

Three more open Dependabot alerts on the same lockfile, all above the
versions the existing pins carried:
- postcss 8.5.23 clears CVE-2026-45623 (high, needs 8.5.12) and a second
  high advisory needing 8.5.18; the lock resolved 8.4.47/8.4.49
- brace-expansion 1.1.13 -> 1.1.16 for CVE-2026-13149
- webpack-dev-server 5.2.5 -> 5.2.6 for CVE-2026-14620 and CVE-2026-14631
…urbot#1053)

Bumps [uuid](https://github.com/uuidjs/uuid) from 11.1.0 to 14.0.0.
- [Release notes](https://github.com/uuidjs/uuid/releases)
- [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md)
- [Commits](uuidjs/uuid@v11.1.0...v14.0.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-version: 14.0.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…1097)

- js-yaml 4.2.0 -> 4.3.0 clears the open high-severity advisory
- svgo 2.8.1 -> 2.8.3
- @tootallnate/once 2.0.1

brace-expansion stays on the 1.x line. CVE-2026-14257 asks for 5.0.8, but
5.x is ESM-only and exports expand as a named binding; the pinned minimatch
3.1.4 requires it as a callable default, so the craco build fails with
"expand is not a function". That advisory needs a snooze rather than a bump.
* [dep][dash](deps): Bump echarts from 5.6.0 to 6.1.0 in /ui/dashboard

Bumps [echarts](https://github.com/apache/echarts) from 5.6.0 to 6.1.0.
- [Release notes](https://github.com/apache/echarts/releases)
- [Commits](apache/echarts@5.6.0...6.1.0)

---
updated-dependencies:
- dependency-name: echarts
  dependency-version: 6.1.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Complete the echarts 6 bump so no vulnerable copy remains

Bumping the direct echarts dependency alone leaves 5.6.0 in the lockfile, so
the advisory stays open. Two things pull it back in:

- echarts-gl 2.0.9 declares a peer of echarts ^5.1.2. It is listed as a
  dependency but never imported anywhere in the source, so it is removed.
- echarts-for-react 3.0.2 declares a peer range that stops at ^5.0.0. 3.0.6
  adds ^6.0.0.

With both handled, an explicit echarts resolution pins the tree to a single
6.1.0.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- go.mod and workflow go-version pins: Go 1.26.1 -> 1.26.5 (Go stdlib CVEs incl CVE-2026-27143)
- CHANGELOG entry for v1.5.3 covering the dependency bumps merged from develop
The 2026-05-25 merge of v1.5.x into develop committed unresolved conflict
markers around the docker/setup-buildx-action pin, making the workflow YAML
unparseable. GitHub deregistered the workflow's triggers as a result, so
workflow_dispatch has returned 422 since then. Resolves to the SHA-pinned
v3.12.0 chosen by the Actions-hardening pass.
The 2026-05-25 merge of v1.5.x into develop committed unresolved conflict
markers around the docker/setup-buildx-action pin, making the workflow YAML
unparseable and deregistering its workflow_dispatch trigger. Resolves to the
SHA-pinned v3.12.0 chosen by the Actions-hardening pass.
Brings the v1.5.3 release commit (Go 1.26.5 in go.mod and the workflow pins,
plus the v1.5.3 changelog entry) onto develop.
…backflow

Merge branch 'v1.5.x' into develop
….2 (turbot#1101)

Bumps [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) from 5.19.1 to 5.19.2.
- [Release notes](https://github.com/go-git/go-git/releases)
- [Changelog](https://github.com/go-git/go-git/blob/main/HISTORY.md)
- [Commits](go-git/go-git@v5.19.1...v5.19.2)

---
updated-dependencies:
- dependency-name: github.com/go-git/go-git/v5
  dependency-version: 5.19.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…turbot#1100)

Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](fastify/fast-uri@v3.1.4...v3.1.5)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Powerpipe's export formats are csv, html, json, md, nunit3, and asff
(confirmed against internal/controldisplay/templates/) -- no OSCAL, and
no reference to it anywhere in the codebase (confirmed via code search).
OSCAL 1.2.3 is the NIST-standard machine-readable format for assessment
results; Prowler, DefectDojo, and IBM's compliance-trestle all support
it, so Powerpipe -- the most broadly-used open compliance-as-code tool
across AWS/GCP/Azure/GitHub/many providers -- is a real, verified gap.

Adds internal/controldisplay/templates/oscal.json/, a new output
template following the exact pattern of the existing asff.json format
(control_row_template -> external standardized schema). Maps
Powerpipe's five control-row statuses to OSCAL:
  - every row becomes an Observation (uuid, description, methods,
    collected -- all schema-required, all present)
  - only "alarm" (failed) rows also become a Finding; "error"/"skip"/
    "info" are inconclusive, not failures, so -- matching the same
    honesty rule used in the Prowler OSCAL exporter (prowler#12475) --
    they are never asserted satisfied/not-satisfied, Observation only
  - finding.target uses type "objective-id" and target-id the
    control's FullName (a dotted Powerpipe control name satisfies the
    OSCAL TokenDatatype pattern, which a raw uuid would not)
  - "observations"/"findings" are omitted entirely when empty rather
    than emitted as [], since both have schema minItems: 1

Adds "uuidv4" to the sprig function whitelist in template_functions.go
(one line) -- OSCAL requires real uuid fields the existing whitelist
had no way to produce.

Verified against the REAL official schema, not assumed: downloaded
the authoritative schema from the usnistgov/OSCAL v1.2.3 release, and
added formatter_oscal_test.go, which renders the template through the
actual TemplateFormatter.Format() code path (real Go structs, no HCL
parsing needed since ControlRun exposes FullName/Title/Description/
Severity directly) against two hand-built ExecutionTrees -- one mixed
ok+alarm, one all-ok -- and writes the real output for out-of-process
schema validation. Both validate with zero errors against the official
schema; the all-ok case confirms "findings" is genuinely absent, not [].

gofmt clean, go vet clean, full package test suite passes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 5 committers have signed the CLA.

✅ pskrbasu
✅ kaidaguerre
❌ cbruno10
❌ graza-io
❌ AAH20
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants