Gronktayvius Redteam
High — src/Forge.Approvals.Cli/SqliteApprovalLedger.cs:30 — Initialize rejects a reparse point only on the leaf (Attributes / LinkTarget), then creates the database by path at SqliteApprovalLedger.cs:49. Path.GetFullPath does not resolve junctions or symlinks, and Directory.CreateDirectory follows an ancestor link, so the leaf check passes when a parent is a junction or symlink. The leaf is created inside the attacker's directory. That parent owner can rename the executor's leaf away and place their own directory and SQLite file at the ledger path. The executor then opens the substituted database and will honor forged approval rows. The same swap works as a race when the parent grants delete-child, because the reparse check, the ACL/chmod, the empty check, and new FileStream are separate path lookups. File.SetUnixFileMode follows symlinks, so a swap in that window also changes the mode of the link target. A bind mount has no reparse bit, so it passes this check too.
Fix: reject a reparse point on every component from the volume root. Open the parent with no-follow (O_NOFOLLOW + O_DIRECTORY; on Windows FILE_FLAG_OPEN_REPARSE_POINT and refuse a reparse tag) and create the database relative to that handle. Persist device, inode, owner, and mode. Every later Open must refuse the file when any of those differ.
Medium — src/Forge.Approvals.Twilio/TwilioProvider.cs:45 — BuildDeviceMessage copies EffectBinding and HumanSummary straight into the push text after ApprovalRequest.IsValid. IsValid (src/Forge.Approvals.Core/Models.cs:46) checks the hash, UUIDv7, and a 1–30 minute UTC window only. The new size limits are applied in Parse, which this path does not call. The new EffectBinding check at Models.cs:152 is length-only and is not the label allowlist (ValidateLabel rejects controls and non-ASCII). FileRequestStore.Load (src/Forge.Approvals.Cli/Stores.cs:32) deserializes with JsonSerializer and returns the object when the jti matches, with no IsValid and no Parse. A stored request whose hash matches can put CR, LF, or bidi characters in EffectBinding (up to the 256-character message cap, or 32 characters if it did pass Parse) and add a second Target: / Label: line under the real target. That is the text the human approves.
Fix: build the device message only from fields that have passed ValidateLabel. Use ValidateLabel(effectBinding, MaximumEffectCharacters) in Parse. Make IsValid fail when Parse would fail, and call that from Load before the value is returned.
Medium — src/Forge.Approvals.Cli/SqliteApprovalLedger.cs:104 — TryRecordAsync now honors caller-supplied now, and any now.UtcTicks greater than or equal to the stored clock is committed. There is no ceiling against TimeProvider. One call with DateTimeOffset.MaxValue advances clock.utc_ticks to the end of the range. Later TryCommitEffectAsync / TryObserveAsync see system time behind that value and fail. Initialize refuses an existing database, so the ledger stays wedged until manual maintenance. Failure is closed (approvals stop), and it is durable.
Fix: reject now when it is ahead of GetUtcNow() by more than a small skew, and reject values outside the approval lifetime window. Keep the monotonic check.
Medium — src/Forge.Approvals.Notify/Notifications.cs:165 — the marker is created with CreateNew before WriteByte / Flush. Those writes sit outside the IOException catch. A failed write leaves the marker in place and throws once. The next call hits File.Exists(marker) and returns without notifying. One failed flush permanently drops notifications for that jti.
Fix: write a temp marker and rename it into place only after a durable flush, or delete the marker if write or flush fails. Treat an existing marker as already sent only when its contents are the complete payload.
Medium — src/Forge.Approvals.Cli/Stores.cs:14 — the temp file is created with a default FileStream (no UnixCreateMode, no Windows ACL). Rename keeps that mode. On Linux the file is 0666 & ~umask (typically 0644), so other local users can read the pending approval (target, amount, command hash). The ledger path in this same delta sets UnixFileMode.UserRead | UserWrite.
Fix: set UnixCreateMode to user read/write, and on Windows set an owner-only DACL on the temp file before the rename.
Medium — ci/Assert-TestResults.ps1:13 — the new gate allows ResultSummary outcome Passed or Completed and adds only error, timeout, aborted, and notRunnable. A run with inconclusive, notExecuted, disconnected, or passedButRunAborted greater than zero still passes when failed is 0 and executed is greater than 0. Skipped security tests (notExecuted, outcome still Passed) clear the gate.
Fix: fail unless failed, error, timeout, aborted, notRunnable, inconclusive, notExecuted, disconnected, and passedButRunAborted are all zero. Allow outcome Completed only under that same condition.
Low — src/Forge.Approvals.Notify/Notifications.cs:111 — the email timeout is logged only through an optional Action<string>? log that defaults to null. No call site in this delta passes one, so new EmailNotifier(sender, recipient) still swallows the timeout with no record. The catch is at Notifications.cs:147.
Fix: require a logger, or always emit the timeout on the same sink the outbox already uses.
No new package references in this delta, so there is no new dependency advisory surface here. This pass did not run live advisory lookups (review was diff-only, as ordered).
Prior items that this delta closes: trx name collision via LogFilePrefix; second-aligned Create plus SameSecond; null request/evidence mapped to Invalid before ProviderUnavailable; TryRecordAsync reads now; request save uses a temp file and File.Move; empty-directory check runs after the ACL; device text places Target before Effect; IsValid is applied on the gate, verifier, ledger, and Twilio entry points.
Files reviewed: .github/workflows/ci.yml, ci/Assert-TestResults.ps1, src/Forge.Approvals.Cli/SqliteApprovalLedger.cs, src/Forge.Approvals.Cli/Stores.cs, src/Forge.Approvals.Core/ApprovalGate.cs, src/Forge.Approvals.Core/Approvers.cs, src/Forge.Approvals.Core/Models.cs, src/Forge.Approvals.Notify/Notifications.cs, src/Forge.Approvals.Twilio/TwilioOptions.cs, src/Forge.Approvals.Twilio/TwilioProvider.cs.