Skip to content

feat: onboard cygnetdigital/wait_for_response action - #1

Merged
anurag-stepsecurity merged 1 commit into
mainfrom
release
Nov 18, 2026
Merged

anurag-stepsecurity merged 1 commit into
mainfrom
release

Conversation

@anurag-stepsecurity

Copy link
Copy Markdown
Collaborator

@anurag-stepsecurity anurag-stepsecurity added the review-required Request Claude AI code review on the PR label Nov 18, 2026
@anurag-stepsecurity anurag-stepsecurity removed the review-required Request Claude AI code review on the PR label Nov 18, 2026
@github-actions

Copy link
Copy Markdown

PR Review

Action Type

Docker-based action — builds from a local Dockerfile (runs: using: "docker", image: "Dockerfile").


✅ Passed Checks

  • License present with copyright of both original author (Justin Knight, 2020) and StepSecurity (2026)
  • action.yml present with author: 'step-security'
  • SECURITY.md present
  • No FUNDING.yml or funding.yml file
  • .github/workflows/ contains both auto_cherry_pick.yml and actions_release.yml
  • No renovate.json file
  • No PULL_REQUEST.md file
  • No ISSUE_TEMPLATE folder
  • No CHANGELOG.md file
  • No .vscode folder
  • README example uses major version only (step-security/wait_for_response@v2)
  • README contains the StepSecurity Maintained Action banner
  • Subscription check present and calls the correct API URL
  • upstream variable in subscription check ("cygnetdigital/wait_for_response") correctly matches original-owner/repo-name from auto_cherry_pick.yml

❌ Failed Checks

  • Docker image not published: action.yml sets image: "Dockerfile", which builds locally at run-time instead of referencing a pre-built, published Docker image. The image must be published to the step-security org and referenced via image: "docker://ghcr.io/step-security/wait_for_response:v<major>" (or equivalent).
  • No published image in step-security org: Follows from the above — no image has been built and pushed to a step-security container registry.
  • Docker image not tagged with major version: Follows from the above — without a published image there is no major-version tag.
  • go.mod module path is wrong: module github.com/nev7n/wait_for_response still references the old upstream author's GitHub account (nev7n). It must be updated to github.com/step-security/wait_for_response.

⚠️ Warnings

  • entrypoint.sh is dead code: The file is included in the repository but the Dockerfile's ENTRYPOINT goes directly to the compiled binary (/app/wait_for_response); entrypoint.sh is never referenced. It should either be wired up or removed.
  • Docker base images not pinned to digests: golang:1.27 and alpine:3.24 are referenced by tag only. For supply-chain security, pin each FROM to a SHA256 digest (e.g., golang:1.27@sha256:<hash>).

🔒 Security Findings

  1. Nil pointer dereference (main/main.go, request construction block): If http.NewRequest returns an error, req is nil but execution continues to req.SetBasicAuth(...) and then into the polling loop — both will panic at runtime. An os.Exit(1) (or return) must follow the error print.
  2. HTTP response body leak (main/main.go, polling loop): Each iteration calls client.Do(req). When the response is received but the status code does not match, res.Body is never closed. Under sustained polling this exhausts file descriptors. res.Body.Close() must be called for every non-matching response.

Summary

The action is not ready to merge in its current form. The three Docker-specific requirements all fail because the action builds from a local Dockerfile instead of using a pre-built, published image in the step-security org. Two security bugs in main/main.go (nil dereference on request construction failure, response body leak in polling loop) must also be fixed before the action is production-safe.

Comment thread action.yml Resolved
Comment thread go.mod Resolved
Comment thread main/main.go Resolved
Comment thread main/main.go Resolved
Comment thread entrypoint.sh Resolved
Comment thread action.yml Resolved
Comment thread Dockerfile Resolved
Comment thread Dockerfile Resolved
Comment thread go.mod Resolved
Comment thread main/main.go Resolved
Comment thread main/main.go Resolved
Comment thread entrypoint.sh Resolved
@github-actions

Copy link
Copy Markdown

PR Review

Action Type

Docker-based action — builds image at runtime from a local Dockerfile via runs: using: "docker" with image: "Dockerfile".


✅ Passed Checks

  • License present with both original author (Justin Knight) and StepSecurity copyright
  • action.yml present with author: 'step-security'
  • SECURITY.md present
  • FUNDING.yml / funding.yml not present
  • .github/workflows/auto_cherry_pick.yml present
  • .github/workflows/actions_release.yml present
  • renovate.json not present
  • PULL_REQUEST.md not present
  • ISSUE_TEMPLATE folder not present
  • CHANGELOG.md not present
  • .vscode folder not present
  • README example uses major version only (@v2, not a full semver tag)
  • README contains the StepSecurity Maintained Action banner
  • Subscription check present — calls https://agent.api.stepsecurity.io/v1/github/$GITHUB_REPOSITORY/actions/maintained-actions-subscription
  • Subscription upstream value (cygnetdigital/wait_for_response) correctly matches original-owner/repo-name from auto_cherry_pick.yml

❌ Failed Checks

  • Published Docker image not used: action.yml sets image: "Dockerfile", which builds the Docker image at runtime from source rather than using a pre-built image. Per policy, the action must reference a published Docker image hosted under the step-security org.
  • No image published to step-security org: Because no image is pre-built and pushed, this requirement cannot be met.
  • Docker image not tagged with major version: There is no published image to tag.
  • Non-existent Go version in Dockerfile: FROM golang:1.27 as builder — Go 1.27 does not exist (latest stable is 1.23.x). The image build will fail until this is corrected.

⚠️ Warnings

  • Duplicate Alpine FROM stage in Dockerfile (lines 20–22): An incomplete Alpine stage (FROM alpine:3.24 with no COPY from the builder and an orphaned ENTRYPOINT) appears immediately before the real final stage. This is dead code and will confuse readers.
  • entrypoint.sh is unused: The file exists but is never invoked — the Dockerfile sets the Go binary as ENTRYPOINT directly, and action.yml passes no args:. As a result, the localhost IP-substitution feature is silently broken (INPUT_LOCALHOST is never populated).
  • go.mod module path references old owner: module github.com/nev7n/wait_for_response should be updated to github.com/step-security/wait_for_response.
  • Unhandled error from http.NewRequest (main/main.go lines 105–108): If request construction fails the code prints a warning but continues, causing a nil-pointer panic when req.SetBasicAuth or client.Do(req) is subsequently called. The error should terminate execution.
  • Response body leak in polling loop (main/main.go lines 117–122): When the server responds with an unexpected status code, res.Body is never closed. Over a long polling interval this will exhaust available connections.

🔒 Security Findings

  • Unpinned, non-existent Go base image: golang:1.27 does not currently exist. When it is eventually released, using a floating major tag means any breaking change in that Go release will silently affect the action. Pin to an existing, specific patch version (e.g. golang:1.23.4).
  • Argument injection risk in entrypoint.sh: The script passes positional parameters directly into the binary invocation ("-url=$1", "-code=$2", etc.) with no sanitisation. Although the file is currently unused, if it were wired in a future change, crafted input values could inject additional flags. Either remove the file or add input validation.

Summary

The action is structurally well-formed — license, SECURITY.md, required workflows, and subscription check all pass — but it fails the core Docker policy requirement: it must use a pre-built image published to the step-security org rather than building from a local Dockerfile. The golang:1.27 base image also does not exist and will cause build failures. Both blockers must be resolved before merge.

Signed-off-by: Anurag Rajawat <anurag@stepsecurity.io>
@anurag-stepsecurity
anurag-stepsecurity merged commit 29c4ad8 into main Nov 18, 2026
4 checks passed
@anurag-stepsecurity
anurag-stepsecurity deleted the release branch November 18, 2026 13:01
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