Skip to content

chore: sync with upstream v0.33.0 - #103

Merged
Raj-StepSecurity merged 3 commits into
mainfrom
auto-cherry-pick
Nov 17, 2026
Merged

Raj-StepSecurity merged 3 commits into
mainfrom
auto-cherry-pick

Conversation

@Raj-StepSecurity

Copy link
Copy Markdown
Contributor

@Raj-StepSecurity

Copy link
Copy Markdown
Contributor Author

📦 Target Release Version: v0.33.0
📋 Previous Release Version: v0.31.2

@Raj-StepSecurity Raj-StepSecurity added the review-required This PR requires review label Nov 12, 2026
@github-actions

Copy link
Copy Markdown

PR Review

Action Type

Docker-based action — uses a pre-built Docker image published to ghcr.io/step-security/action-markdownlint.


✅ Passed Checks

  • License is present with copyright for both StepSecurity and the original author (James Mills / prologic).
  • action.yml exists and author field is correctly set to step-security.
  • SECURITY.md is present.
  • No FUNDING.yml found.
  • Required workflows present: .github/workflows/auto_cherry_pick.yml and .github/workflows/actions_release.yml both exist.
  • No renovate.json found.
  • No PULL_REQUEST.md found.
  • No ISSUE_TEMPLATE folder found.
  • No CHANGELOG.md found.
  • No .vscode folder found.
  • StepSecurity banner is present at the top of README.md.
  • Subscription check is present in entrypoint.sh and calls the correct URL: https://agent.api.stepsecurity.io/v1/github/$GITHUB_REPOSITORY/actions/maintained-actions-subscription.
  • UPSTREAM variable in entrypoint.sh is "reviewdog/action-markdownlint", which correctly matches <original-owner>/<repo-name> from auto_cherry_pick.yml (original-owner: "reviewdog", repo-name: "action-markdownlint").
  • Docker image is published to the step-security org on GHCR (ghcr.io/step-security/action-markdownlint).
  • config.json correctly records this as a docker action synced to upstream v0.33.0.

❌ Failed Checks

  • CRITICAL — Unresolved merge conflicts in Dockerfile: Lines 1–9 contain raw Git conflict markers (<<<<<<<, =======, >>>>>>>). The Dockerfile cannot be parsed or built in this state. The conflict is between the existing multi-stage Go builder base (golang:1.27-alpine3.24) and the upstream's new single-stage Node base (node:24-bookworm-slim). This must be resolved before the PR can be merged.

  • action.yml Docker image not updated to v0.33.0: The image reference still points to ghcr.io/step-security/action-markdownlint:v0.31.2@sha256:ec2fed89f898cbc1b03a006714009ae045d8a991132131b86fc544b1751d668f. After the Dockerfile conflict is resolved and the new image is built and published, action.yml must be updated to reference the new v0.33.0 image with its digest.

  • Docker image not tagged with major version: Per docker-based action requirements, the image in action.yml must be tagged with the major version (e.g., :v0) rather than a full semver tag (:v0.31.2).

  • README.md example uses full commit SHA instead of major version: The usage example shows:

    uses: step-security/action-markdownlint@3667398db9118d7e78f7a63d10e26ce454ba5f58 # v0.26.2

    It should use only the major version tag, e.g.:

    uses: step-security/action-markdownlint@v0
  • actions.lock references non-existent upstream workflows: The newly added .github/workflows/actions.lock references depup.yml, dockerimage.yml, and release.yml — none of which exist in this repository. These are upstream (reviewdog) workflow lock entries that were incorrectly carried over. Only workflows that exist in this repo should appear in the lock file.


⚠️ Warnings

  • actions.lock lists actions/checkout@v7.0.1: The current stable release of actions/checkout is v4, not v7. Version 7.0.1 does not exist. This strongly suggests the lock file was auto-generated from the upstream repo's data rather than from this repo's actual workflows, further confirming the lock file needs to be regenerated or removed.

  • Conflicting markdownlint-cli versions: The Dockerfile's existing code (pre-merge base) installs markdownlint-cli@v0.49.1, while the incoming upstream change proposes v0.50.0. Once the merge conflict is resolved, ensure the final version is intentionally chosen and consistent.

  • JSON construction without sanitization in entrypoint.sh: Lines 21–23 build a JSON body using printf with $ACTION_REPO and $SERVER_URL interpolated directly. If either variable contains a " or \ character, the JSON would be malformed. While GitHub controls these values making exploitation unlikely, using jq -n for JSON construction would be more robust.


🔒 Security Findings

  • Command injection risk via unquoted user inputs in entrypoint.sh: ${INPUT_MARKDOWNLINT_FLAGS:-.} (line 49, 64) and ${INPUT_REVIEWDOG_FLAGS} (line 59, 79) are intentionally unquoted (guarded with # shellcheck disable=SC2086) to allow callers to pass multiple space-separated flags. However, these are user-controlled action inputs and could contain shell metacharacters (e.g., ;, &&, $(...)) leading to arbitrary command execution. This is a pre-existing pattern and low-severity given the action runs in an isolated container, but it is worth documenting the expected input format or adding basic sanitization.

Summary

This PR cannot be merged in its current state due to an unresolved Git merge conflict in the Dockerfile that must be fixed first. Additionally, once the conflict is resolved and a new Docker image is built and published, action.yml must be updated with the new image reference, changed to use a major-version tag, and the README example must be updated to use @v0 instead of a full commit SHA.

Comment thread Dockerfile Outdated
Comment on lines +1 to +9
<<<<<<< c91b7c102591cac31fa35dbb9dfd6ab31da5e4fa
FROM golang:1.27-alpine3.24@sha256:8a5910f31396cd4d89662f56c68b3ae31d374308270a1c3bd96672ee5ed43414 AS go-builder
=======
FROM node:24-bookworm-slim@sha256:55fb5f5a527ea2c5c4a95f963e48ef90aa38c7b346054fdc8ee9957a2b55d205

ENV REVIEWDOG_VERSION=v0.21.2
ENV MARKDOWNLINT_CLI_VERSION=v0.50.0

RUN npm install -g "markdownlint-cli@$MARKDOWNLINT_CLI_VERSION"
>>>>>>> e82b781e8865cb734917fdfb8157d49d91271775

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

❌ Unresolved merge conflict — this Dockerfile cannot be built.

Lines 1–9 contain raw Git conflict markers (<<<<<<<, =======, >>>>>>>). The conflict is between:

  • HEAD (this repo's base): Multi-stage build using golang:1.27-alpine3.24 as a Go builder to compile reviewdog from source.
  • Upstream (v0.33.0): Single-stage build using node:24-bookworm-slim with markdownlint-cli@v0.50.0 pre-installed via npm.

The conflict must be resolved before this PR can be merged. The resolution strategy should be discussed: either keep the multi-stage Go build (and update the Node runtime stage) or adopt the upstream's simpler single-stage approach. The existing multi-stage Dockerfile already handles the Node runtime in the second FROM block (line 20 onward), so the upstream's new single-stage block would likely need to be integrated differently.

@Raj-StepSecurity
Raj-StepSecurity marked this pull request as ready for review November 12, 2026 04:45
Comment thread .github/workflows/actions.lock Outdated
# Do not edit by hand; run `gh actions-lock` to update.
# Docs: https://gh.io/actions-lockfile
version: 'v0.0.3'
workflows:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This actions.lock file was cherry-picked from upstream (reviewdog/action-markdownlint) but it references workflows that do not exist in this repository:

  • .github/workflows/depup.yml — not present here
  • .github/workflows/dockerimage.yml — not present here
  • .github/workflows/release.yml — not present here

Only .github/workflows/reviewdog.yml exists in this repo. This lock file reflects upstream's workflow structure, not ours. It should either be removed or regenerated against this repository's actual workflows using gh actions-lock.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment thread Dockerfile
FROM golang:1.27-alpine3.24@sha256:8a5910f31396cd4d89662f56c68b3ae31d374308270a1c3bd96672ee5ed43414 AS go-builder

ENV REVIEWDOG_VERSION=v0.21.2
ENV REVIEWDOG_VERSION=v0.21.3

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

reviewdog is cloned from GitHub at build time using git clone --branch ${REVIEWDOG_VERSION}. This means the Docker image build is dependent on GitHub's availability at build time. Consider whether pinning by tag is sufficient here or if a digest-pinned approach is preferred for more reproducible builds.

@github-actions

Copy link
Copy Markdown

PR Review posted as inline comments. See inline review comments on the diff for specific findings. Summary: Docker-based action. Version bumps correct. Failed: README uses full semver not major version, action.yml not updated to v0.33.0, Docker image uses full semver tag not major, actions.lock cherry-picked from upstream references non-existent workflows. No critical security issues.

@github-actions

Copy link
Copy Markdown

FULL REVIEW - Action Type: Docker-based. PASSED: License OK (prologic + StepSecurity), action.yml author=step-security, SECURITY.md present, no FUNDING.yml, auto_cherry_pick.yml + actions_release.yml present, no renovate.json/PULL_REQUEST.md/ISSUE_TEMPLATE/CHANGELOG.md/.vscode, README banner present, subscription check URL correct, UPSTREAM var matches auto_cherry_pick.yml, image on GHCR step-security org. FAILED: (1) README example uses commit SHA with v0.26.2 semver comment - must use @v0 only; (2) action.yml image uses full semver :v0.31.2 - must use major version tag :v0; (3) action.yml not updated from v0.31.2 to v0.33.0 to match this sync; (4) actions.lock cherry-picked from upstream references depup.yml, dockerimage.yml, release.yml which do not exist here. WARNINGS: unquoted INPUT_MARKDOWNLINT_FLAGS/REVIEWDOG_FLAGS (intentional, accepted risk); echo -e with /bin/sh (harmless on Alpine). SECURITY: no critical findings; subscription check correct; minor - reviewdog git clone pinned by tag not digest. SUMMARY: version bumps correct but action.yml, README, and actions.lock need attention before merge.

Comment thread config.json
"action_type": "docker",
"upstream": {
"repository": "reviewdog/action-markdownlint",
"synced_tag": "v0.33.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The synced_tag here is v0.33.0, but action.yml still references the old Docker image tagged v0.31.2. After merging this PR, the Docker image for v0.33.0 must be built and pushed, and then action.yml updated to reference the new image SHA/tag. As-is, users of this action will still run the v0.31.2 Docker image even though the Dockerfile has been updated.

Comment thread Dockerfile
FROM golang:1.27-alpine3.24@sha256:8a5910f31396cd4d89662f56c68b3ae31d374308270a1c3bd96672ee5ed43414 AS go-builder

ENV REVIEWDOG_VERSION=v0.21.2
ENV REVIEWDOG_VERSION=v0.21.3

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The reviewdog build clones GitHub using a git tag (--branch ${REVIEWDOG_VERSION}). Git tags are mutable — a tag can be moved to a different commit after the fact. For a stronger supply chain guarantee, consider pinning to a commit SHA instead (e.g., --branch <sha>). The Go module pin (golang.org/x/crypto@v0.45.0) is a good pattern — the same approach at the source level would eliminate this remaining risk.

@github-actions

Copy link
Copy Markdown

PR Review

Action Type

Docker-based action - runs a pre-built Docker image referenced in action.yml, built from the Dockerfile in this repo.


Passed Checks

  • License present with both StepSecurity (2025) and original author (James Mills / prologic) copyrights.
  • action.yml present with author set to step-security.
  • SECURITY.md present with correct reporting address.
  • No FUNDING.yml present.
  • .github/workflows/auto_cherry_pick.yml present.
  • .github/workflows/actions_release.yml present.
  • No renovate.json present.
  • No PULL_REQUEST.md present.
  • No ISSUE_TEMPLATE folder present.
  • No CHANGELOG.md present.
  • No .vscode folder present.
  • README.md has the StepSecurity maintained action banner at the top.
  • Subscription check URL in entrypoint.sh is correct.
  • UPSTREAM variable in entrypoint.sh is reviewdog/action-markdownlint, matching original-owner/repo-name from auto_cherry_pick.yml.
  • Docker image published to step-security org: ghcr.io/step-security/action-markdownlint.

Failed Checks

  • action.yml Docker image not updated to match synced version. The PR syncs to upstream v0.33.0 and updates the Dockerfile, but action.yml still points to the old image tagged v0.31.2. The new Docker image must be built, pushed, and action.yml updated with the new image digest before this PR is complete.

  • Docker image not tagged with major version only. The docker.yml publish workflow tags images only with the full semver (e.g. v0.31.2). The requirement is that the image must also carry a major-version tag (e.g. v0). Neither action.yml nor the publish workflow currently applies one.

  • README.md example uses a commit SHA and full semver comment, not a major version tag. The usage example references a pinned commit SHA with the comment v0.26.2. Users should be shown only the major-version tag (e.g. @v0) per the StepSecurity convention.


Warnings

  • config.json is a new file tracking upstream sync state (synced_tag: v0.33.0). No functional concern, but it will appear inconsistent until action.yml is also updated to reflect the new version.

  • Potential script injection in docker.yml (pre-existing, not introduced by this PR). The Validate tag format step interpolates the workflow_dispatch input directly into the shell script body without quoting. If the input contains shell metacharacters they would be executed. Fix: expose the value as an env var in the step so it is never interpreted as shell syntax.


Security Findings

  1. Mutable git tag used for reviewdog source clone (Dockerfile line 6). The build clones reviewdog from GitHub using --branch with a tag name. Git tags are mutable and can be pointed to a different commit after the fact. Pinning the clone to an immutable commit SHA would eliminate this supply chain risk.

  2. Script injection in docker.yml (described above). Only exploitable by users with workflow_dispatch write access so blast radius is limited, but it should still be remediated.


Summary

This PR correctly bumps REVIEWDOG_VERSION (v0.21.2 to v0.21.3) and MARKDOWNLINT_CLI_VERSION (v0.49.1 to v0.50.0) in the Dockerfile and adds a config.json sync-tracking file, but the PR is incomplete: action.yml still points to the old v0.31.2 Docker image and must be updated after the new image is built and pushed. Additionally, the Docker publish workflow should be updated to push a major-version tag alongside the full semver tag.

@Raj-StepSecurity
Raj-StepSecurity merged commit 570198c into main Nov 17, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-required This PR requires review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants