Skip to content

fix: bound Action bundle manifest validation - #170

Merged
GrantBirki merged 3 commits into
openai:mainfrom
sylvesterkaczmarek:fix/bound-action-bundle-manifest
Aug 18, 2026
Merged

fix: bound Action bundle manifest validation#170
GrantBirki merged 3 commits into
openai:mainfrom
sylvesterkaczmarek:fix/bound-action-bundle-manifest

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor

Summary

Make the release-side Action bundle validator enforce the same 16 KiB manifest bound as the Action runtime.

Problem

The protected Action runtime reads bundle-manifest.json through readJsonBounded(..., 16 * 1024, ...), so a distribution manifest larger than 16 KiB is rejected before the Action can start.

script/validate-action-bundle, which is used to validate assembled/release bundle state, checks the manifest's structure and fields but currently reads it with an unbounded read_text. A manifest can therefore pass packaging validation and still be unusable by the runtime.

Evidence / reproduction

  • action/lib.cts::validateBundle reads the bundle manifest with an explicit 16 KiB bound.
  • script/validate-action-bundle validates the same action/bundle-manifest.json contract but on the base commit has no corresponding size check before json.loads(manifest_path.read_text(...)).
  • The schema's semantic values are tightly constrained, but JSON permits arbitrary insignificant whitespace. That gives a minimal reproduction without changing any signed identity field: take a valid generated manifest and append more than 16 KiB of spaces.
  • json.loads still parses that document to exactly the same object, so the base release-side validator accepts it.
  • The Action runtime rejects the same file at its bounded-read boundary before validateBundle can complete.
  • The added provenance regression copies a valid assembled bundle, appends only trailing JSON whitespace until the file exceeds 16 KiB, and requires the packaging validator to reject it.

This closes a validator/runtime contract gap rather than introducing a new limit.

Change

  • require bundle-manifest.json to be non-empty and at most 16 KiB in script/validate-action-bundle
  • add a focused regression to the existing Action bundle provenance test
  • preserve all existing schema, checksum, symlink and binary-size validation

No manifest schema, release metadata, binary, or Action runtime behavior changes.

@GrantBirki GrantBirki left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The packaging limit now matches the Action runtime, and the regression test covers oversized manifests. Looks good, thanks!

@GrantBirki
GrantBirki merged commit c6c294b into openai:main Aug 18, 2026
49 of 51 checks passed
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.

2 participants