fix(agent): harden macos es/ne scaffolding and supervision#180
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c52c469b75
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Addressed the review feedback in 1698f87. Changes:
Local validation rerun:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e2406e139a
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Addressed the remaining PR feedback in Changes:
Local validation:
The two remaining attestation bot threads are false positives: the comment bodies explicitly walk themselves back, and the current |
|
Addressed the last open review comment in Change:
Local validation:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b24cc48b6b
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Addressed the new aggregation/health comments in Changes:
Local validation:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 29c7f58058
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Pushed Changes in this pass:
Local validation:
|
|
Addressed the latest review and CI issues in Changes in this pass:
Local validation:
|
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Codex Review: Didn't find any major issues. Delightful! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Codex Review: Didn't find any major issues. Chef's kiss. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Codex Review: Didn't find any major issues. 🚀 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit edaaefa. Configure here.
| .map_err(|error| format!("failed to inspect system extension entitlements: {error}"))?; | ||
| let mut entitlement_text = String::from_utf8_lossy(&entitlements.stdout).to_string(); | ||
| entitlement_text.push_str(String::from_utf8_lossy(&entitlements.stderr).as_ref()); | ||
| validate_system_extension_entitlements_output(&entitlement_text) |
There was a problem hiding this comment.
Missing codesign exit status check before entitlement validation
Low Severity
validate_system_extension_codesign does not check entitlements.status.success() after running codesign -d --entitlements :-. If codesign fails to extract entitlements (e.g., corrupted bundle or permission error), the empty/error output is still passed to validate_system_extension_entitlements_output, which would report "missing entitlement" instead of the actual extraction failure. The earlier --verify and -dvv invocations both check their exit status, but this third invocation does not.
Reviewed by Cursor Bugbot for commit edaaefa. Configure here.
|
Codex Review: Didn't find any major issues. Can't wait for the next one! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review current head 012f7bbe9a |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 012f7bbe91
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return Ok(None); | ||
| } | ||
|
|
||
| Ok(String::from_utf8(bytes).ok()) |
There was a problem hiding this comment.
Reject undecodable packaging files during release scan
Treating String::from_utf8(bytes) failures as None makes the release gate silently skip any non-UTF-8 packaging source, and the caller now continues on None, so both placeholder and scaffold_only checks are bypassed for that file. In REQUIRE_CONCRETE builds, a mis-encoded text asset (for example a UTF-16 plist/profile) can therefore ship with unresolved __PLACEHOLDER__ values without failing validation; this should fail closed (error) for undecodable text instead of silently skipping.
Useful? React with 👍 / 👎.
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |


Summary
Testing
Note
Medium Risk
Medium risk because it materially changes CI/release behavior (new fail-closed packaging checks, Swift coverage gates, and notarization/signing steps) and updates dependency lockfiles, which could cause build/release failures if environment variables, signing assets, or updated crates behave differently.
Overview
This PR hardens the agent’s macOS system-extension packaging by adding build-time validation in
apps/agent/src-tauri/build.rs(required assets present,tauri.conf.jsonincludes required macOS settings/resources, and optionally release-gated checks for placeholders/scaffold_onlyplus verification of a prebuilt signed.systemextensionbundle viacodesignand required entitlements).CI is expanded to run and gate Swift system-extension packages: a new macOS job runs
swift testfor EndpointSecurity/NetworkExtension packages, generates coverage JSON viallvm-cov, and enforces a changed-line Swift coverage floor; Rust coverage now also includes agent Tauri LCOV, and cargo-audit behavior is tightened for app lockfiles while adding new ignored advisories. Release automation is updated to validate macOS packaging preflight, verify offline/vendored Rust builds, and replace the agent DMG build with a notarization/signing flow (pinnedtauri-cli, certificate/keychain setup, notarytool profile handling, provisioning a prebuilt system-extension bundle, and uploading notarization evidence). Dependency updates include pinning workspacerandto0.9.4and refreshingCargo.lock/apps/agent/src-tauri/Cargo.lock;prepare-bundled-hushd.shnow also builds/bundles Swift status tools, and the agent README is expanded to document local EDR endpoints and telemetry behavior.Reviewed by Cursor Bugbot for commit 012f7bb. Bugbot is set up for automated code reviews on this repo. Configure here.