Skip to content

plugin new/pin hardening: handle-based pin digest, raw-line JSON, GOWORK in build steps, error reasons and limits, adopted dir mode (#359) - #374

Merged
DanielNetzer merged 2 commits into
mainfrom
forgecell/issue-359-74829c2e583307c1539f04d3
Nov 4, 2026
Merged

DanielNetzer merged 2 commits into
mainfrom
forgecell/issue-359-74829c2e583307c1539f04d3

Conversation

@DanielNetzer

Copy link
Copy Markdown
Owner

Implements issue #359.

Molecule: mol-359-d63b0822b738b8ee0c013bfa
Formula: forgecell-github-issue
Base: 10318096141ed061379a8f93f6657d991083b7be
Delivery: 795f5aad06184165715b67f0fc78cf2c033d1138

Awaiting exact-commit CI and human review. Harness-reported checks are not independent CI evidence. No merge, deployment or issue closure is authorized.

…ORK in build steps, error reasons and limits, adopted dir mode (#359)
@DanielNetzer

Copy link
Copy Markdown
Owner Author

Adversarial review: no HIGH or MEDIUM findings.

  • Pin now reads the temporary manifest back through the directory handle (no symlink following, same file as written, one link, owner-only, within the bound) and hashes those exact bytes before the rename.
  • The skeleton validates the raw line, names reasons through fail, and enforces each tool's contract timeout and output bound, with no overlapping handlers.
  • An adopted group- or world-writable --dir is refused.
  • The README snippets in the Go, Python and TypeScript templates now use the list form plugin pin prints (the map form was refused by the Formula parser), and every kind's rendered Go snippet is parsed with the real parser.

Intended protected delta: TestGoSkeletonIsByteIdentical. Only the 6 hashes of main.go and README.md change.

LOWs, not fixed:

  • If a handler returns exactly as its timeout fires, the call is reported as timed out, which errs on the safe side.
  • If the post-rename check finds plugin.json was swapped, it errors after the rename already happened. The message says so honestly.

Integration: base 1031809, origin/main unchanged; #372 and #373 touch other files.

@DanielNetzer
DanielNetzer marked this pull request as ready for review November 4, 2026 06:04
… case (ext4 inode reuse)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DanielNetzer

Copy link
Copy Markdown
Owner Author

CI on ubuntu failed in the new case TestPinRefusesASwappedTempManifest/replaced by an identical file. On ext4 a deleted file's inode number is reused at once, so a delete-then-write replacement had the same dev and inode, and os.SameFile couldn't tell the files apart. The test now holds the original open, so its inode can't be reused. pin.go is unchanged. This is a direct commit on the delivered branch, because Forgecell refuses to amend a delivered Molecule.

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