Repository navigation
fix: harden installer and stores; bump Go 1.27, dependencies, and actions - #40
Merged
Merged
Conversation
- go from 1.25 to 1.27 (go.mod, CI, example image golang:1.27-alpine) - example runtime image alpine from 3.21 to 3.24 - github.com/aws/aws-sdk-go-v2 from 1.41.1 to 1.47.5 - github.com/aws/aws-sdk-go-v2/config from 1.32.7 to 1.33.13 - github.com/aws/aws-sdk-go-v2/service/ssm from 1.67.8 to 1.81.2 - github.com/chainguard-dev/clog from 1.8.0 to 1.8.1 - actions/checkout from 6.0.2 to 7.0.1 - actions/setup-go from 6.2.0 to 7.0.0 - mathieudutour/github-tag-action from 6.2.0 to 7.0.0 - ncipollo/release-action from 1.20.0 to 1.21.0 - release: skip creating a release when github-tag-action v7 produces no tag, and serialize release runs with a concurrency group Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- installer: reject /callback once the installer is disabled so saved credentials cannot be replaced by exchanging another app's code - installer: invoke OnCredentialsSaved only after a successful save - installer: escape org and app slug in generated URLs and trim a trailing slash from GITHUB_URL - configwait: match allowed paths on segment boundaries and never let non-canonical paths (dot segments, repeated slashes) bypass the gate; ignore empty allowed-path entries - configstore/files: reject custom field keys that escape the store directory or collide with reserved credential files - configstore/aws-ssm: create tagged parameters without overwrite and fall back to an untagged overwrite, since SSM rejects tags+overwrite - configstore/envfile: rewrite only updated keys and preserve all other lines verbatim instead of re-quoting the whole file on every save - ghappsetup/configwait: mark the runtime ready after a successful reload and log reload failures - configwait/ghappsetup/ssmresolver: always attempt at least once when MaxRetries is zero or negative instead of reporting success - ssmresolver: recognize SSM ARNs in all AWS partitions - ghappsetup: correct EnsureLoaded and Reload documentation Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 4, 2026
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
Routine dependency chores plus a round of bug and security fixes found while reviewing the library. Split into two commits:
build(deps)for version bumps andfixfor code changes.Dependencies
go.mod, CI, example image)alpine(example runtime image)github.com/aws/aws-sdk-go-v2github.com/aws/aws-sdk-go-v2/configgithub.com/aws/aws-sdk-go-v2/service/ssmgithub.com/chainguard-dev/clogactions/checkoutactions/setup-gomathieudutour/github-tag-actionncipollo/release-actionAll actions are pinned to commit SHAs with
# vX.X.Xcomments and are the latest releases older than 5 days.amannn/action-semantic-pull-requestis already at its latest (v6.1.1).github-tag-actionv7 changes release semantics (see its migration guide): it emits an emptynew_tagwhen there are no eligible commits,feat!:now triggers a major bump, and commits containing[no-release]/[skip-release]are excluded. The release workflow now skips "Create Release" when no tag is produced and serializes runs with a concurrency group. The existingcustom_release_rulesformat is unchanged in v7.Note that bumping the
godirective to 1.27 requires consumers of this library to use Go 1.27+.Fixes
Security
/callbackignored the disabled flag, so anyone who could reach it could exchange a code from their own GitHub App manifest and replace the saved credentials. It now returns 404 once the installer is disabled./setupadminand/setup/../webhookpassed the gate before the service was ready, and an emptyAllowedPathsentry opened the gate entirely. Allowed paths now match on segment boundaries, non-canonical paths (dot segments, repeated slashes) never bypass the gate, and empty entries are ignored.LocalFileStore. Custom field keys were turned into filenames without validation, allowing writes outside the store directory (../../x, absolute paths) or overwriting managed files (e.g.PRIVATE_KEY.PEM, or creating theinstaller-disabledmarker). Such keys are now rejected before anything is written.Correctness
PutParameterwas sent with bothTagsandOverwrite, which SSM rejects. Parameters are now created with tags and fall back to an untagged overwrite when they already exist. The test mock now enforces SSM's rules so this is covered..envstore corrupted unrelated lines. Every save re-serialized the whole file: escaped quotes gained backslashes each time, inline comments were absorbed into values, and single-quoted values lost their quotes. Only updated keys are rewritten now, and appended keys are written in a stable order.Startgave up (e.g. usingStartAsyncbefore the installer was completed), a later successful reload from the installer or SIGHUP never opened the gate. Successful reloads now mark the runtime ready, and reload failures are logged instead of silently dropped.MaxRetries <= 0reported success without loading.configwait.Wait, the Lambda loader, andssmresolver.ResolveEnvironmentWithRetrynow always attempt at least once.OnCredentialsSavedwas invoked before the credentials were saved (contrary to its docs) and ran even when the save failed. It now runs only after a successful save.awspartitions (aws-us-gov,aws-cn,aws-iso*) are now recognized.GITHUB_URLno longer produces a malformed API URL.EnsureLoadedandReloaddocs now describe the actual behavior.Behavior changes to be aware of
AllowedPathsentries no longer act as raw string prefixes:"/api"still allows"/api/..."but no longer"/apikeys". Requests with non-canonical paths get a 503 before the service is ready.LocalFileStore.Savereturns an error for custom field keys that are not plain file names or that collide with reserved credential files.Testing
go vet,gofmt,go mod tidy -diff, andactionlintare clean.-race.disabled_installer_rejects_callback, which shows the stored app being replaced on the old code.golang:1.27-alpine/alpine:3.24.Supersedes #25, #29, #37, #38, #39.
🤖 Generated with Claude Code