Repository navigation
feat: enforce Signal live dry-run boundary - #22
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR hardens the step.signal_service_live_submit “live” execution path to ensure it never constructs a fake/sandbox transport or attempts egress, while returning richer machine-readable outputs to distinguish “approval complete but dry-run required” vs “dry-run accepted”.
Changes:
- Enforce a strict live-mode preflight boundary in
ExecuteSignalServiceLiveSubmit, returning eitherdenied(withapproval_ready/egress_dry_runflags) ordry_run_acceptedwithout building transport. - Extend
ServiceSubmitOutputwithapproval_readyandegress_dry_run, update docs, and add regression tests + a validated pipeline fixture. - Bump release/plugin metadata to
v0.14.0and upgradelibsignal-service-gotov0.6.0.
Reviewed changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| testdata/pipelines/signal-service-dryrun.yaml | Adds a pipeline fixture validating the live dry-run approval boundary and new output fields. |
| scripts/run-pipeline-tests.sh | Ensures the new pipeline fixture is validated in make pipeline-test. |
| README.md | Documents the new live-mode outcomes (approval_ready, egress_dry_run, dry_run_accepted) and the no-transport guarantee. |
| plugin.json | Bumps plugin version and download URLs to v0.14.0. |
| Makefile | Updates VERSION default to 0.14.0. |
| internal/service_transport.go | Implements live-mode preflight and populates new output flags. |
| internal/service_transport_test.go | Adds regression tests ensuring live mode denies/accepts correctly without transport/egress. |
| internal/provider_contracts_test.go | Updates dependency pin assertion to libsignal-service-go v0.6.0. |
| internal/contracts/signal.proto | Adds approval_ready and egress_dry_run to ServiceSubmitOutput. |
| internal/contracts/signal.pb.go | Regenerates protobuf bindings for the new output fields. |
| go.mod | Bumps github.com/GoCodeAlone/libsignal-service-go to v0.6.0. |
| go.sum | Updates checksums for the dependency bump. |
Files not reviewed (1)
- internal/contracts/signal.pb.go: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+284
to
+287
| report := servicepolicy.ValidateApprovalPackage(transportCfg.ApprovalPackage, time.Now().UTC(), operationActions(operation)) | ||
| if !report.LiveAllowed { | ||
| return deniedSubmitResultWithReport(cfg, in, report.DeniedReasons, false, transportCfg.ApprovalPackage.EgressPolicy.DryRun, string(serviceclient.TransportModeLive)) | ||
| } |
Comment on lines
+316
to
+318
| if len(reasons) == 0 { | ||
| reasons = servicepolicy.ValidateApprovalPackage(approvalPackageFromContract(approval), time.Now().UTC(), operationActions(in.GetOperation())).DeniedReasons | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
step.signal_service_live_submitso live mode never constructs fake/sandbox transport or egressesapproval_readyandegress_dry_runtoServiceSubmitOutputlibsignal-service-goto v0.6.0 and release metadata to v0.14.0TDD regression proof
With fix reverted:
go test ./internal -run 'ServiceLiveSubmitLiveRequiresDryRunEvenWithApproval|ServiceLiveSubmitLiveDryRunDoesNotUseTransport' -count=1failed with statuses
acceptedinstead ofdenied/dry_run_accepted.With fix restored:
go test ./internal -run 'ServiceLiveSubmitLiveRequiresDryRunEvenWithApproval|ServiceLiveSubmitLiveDryRunDoesNotUseTransport' -count=1passed.Verification