Skip to content

Added ownership, permissions, size and digest to --simulate-json entries - #95

Open
djbclark wants to merge 1 commit into
simjson-2-renamesfrom
simjson-3-metadata
Open

djbclark wants to merge 1 commit into
simjson-2-renamesfrom
simjson-3-metadata

Conversation

@djbclark

@djbclark djbclark commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

PR 3/4 of the --simulate-json stack (fork review vehicle; nothing sent upstream). Supersedes #92 in smaller steps. Base: simjson-2-renames.

Rebuilt 2026-11-14 (comment-only): PR 1 no longer mentions digests (PR 3 adds that comment), PR 1's .sub notes renames are not in the output yet (PR 2 drops the note). Tip tree still equals #92's 799bd0d8c. Adversary verdicts below are for the pre-rebuild heads with identical code (8c5e6ce2a); not re-run, no code changed.

AI disclosure for the upstream text: "Reviewed with AI help, as in #<PR 1>; the tests are the correctness case."

Adds uid, gid (64-bit), permissions (not for symlinks), size and sha256 (an all-zero HashFile() digest is omitted and logged).

Size: +40 non-test C, +23/-3 tests.

Linux gate (Ubuntu 24.04 aarch64, root, --enable-debug), head eaa114dde: unit All 79 tests passed; simulate_mode_test 16/16; 29_simulate_mode/ acceptance 8/8 (incl. simulate_json.cf); no warnings in touched files.
Negative control: PR 2 tree + these tests: test_json_created_file fails (1 of 16), simulate_json.cf FAIL.
Adversary verdict (head 8c5e6ce2a): "APPROVE." Notes: HashFile_Stream() never checks ferror(), so an EIO can yield the digest of a partial read; a missing sha256 keeps exit 0; a mirrored relative symlink can lead the digest outside the chroot, which is no new exposure since manifest-full prints contents.

Prior art / docs checked: same as #92 (no upstream machine-readable simulate output; cfengine#6294 closed, CFE-4716 rejected).

🤖 Generated with Claude Code

@greptile-apps

greptile-apps Bot commented Nov 14, 2026

Copy link
Copy Markdown

Automatic reviews are disabled for this repository. Configure in Code Review Settings.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T16:00:37.541626Z 8c5e6ce PR opened
🔒 Security Review ✅ Completed 2026-11-14T16:04:23.334797Z 8c5e6ce PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Entries now carry the owner and group, and the permissions, size and
SHA-256 digest where they apply.

Ticket: none
Changelog: Title
Signed-off-by: Daniel JB Clark <djbclark@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.

1 participant