Skip to content

Add privileged lifecycle integration coverage - #1

Merged
euforic merged 3 commits into
mainfrom
euforic/privileged-lifecycle-coverage
Aug 12, 2026
Merged

Add privileged lifecycle integration coverage#1
euforic merged 3 commits into
mainfrom
euforic/privileged-lifecycle-coverage

Conversation

@euforic

@euforic euforic commented Aug 12, 2026

Copy link
Copy Markdown
Member

Summary

  • cover ordinary-user init/install/upgrade/uninstall, CA trust, launchd, and live hosts safety boundaries with real macOS resources
  • add a manually dispatched, protected ephemeral macOS workflow for the provisioned privileged lifecycle
  • document the split between ordinary read-only tests and gated system mutation coverage

Validation

  • go fmt ./...
  • go vet ./...
  • go test ./...
  • go test -race ./...
  • golangci-lint run --timeout=5m
  • actionlint
  • go mod tidy with no module diff

Copilot AI lite review requested due to automatic review settings August 12, 2026 03:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6401fbf03a

ℹ️ 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".

test ! -e /usr/local/share/portless/ca.pem
test -e "/Library/Application Support/Portless/pki/ca.pem"
ca_hash="$(openssl x509 -in "/Library/Application Support/Portless/pki/ca.pem" -noout -fingerprint -sha256 | cut -d= -f2 | tr -d :)"
if /usr/bin/security find-certificate -a -Z /Library/Keychains/System.keychain | grep -Fq "$ca_hash"; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Consume all security output before testing the hash

When the CA hash is found before security finishes writing the system keychain listing, grep -q exits early and security can receive SIGPIPE; because this script enables pipefail, the pipeline is then nonzero and the if incorrectly treats the certificate as absent. This can let the workflow pass even when uninstall leaves the CA trusted, so avoid early-exit grep or capture the complete output before checking it.

AGENTS.md reference: AGENTS.md:L45-L46

Useful? React with 👍 / 👎.

Comment on lines +39 to +40
- name: Build release-equivalent binary
run: go build -trimpath -o "$RUNNER_TEMP/portless" ./cmd/portless

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Build the same binary configuration used for releases

This step uses the runner's default CGO setting and leaves the development version/stripping flags in place, whereas .goreleaser.yaml:9-19 builds with CGO_ENABLED=0 and release ldflags. Consequently, lifecycle failures specific to the actual shipped binary configuration can pass this supposedly release-equivalent privileged workflow; build with the GoReleaser settings or exercise a GoReleaser-produced artifact.

Useful? React with 👍 / 👎.

@euforic
euforic merged commit dd21d87 into main Aug 12, 2026
5 checks passed
@euforic
euforic deleted the euforic/privileged-lifecycle-coverage branch August 12, 2026 03:34
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