Skip to content

ci: Replace third-party GitHub Actions with trusted alternatives#3320

Merged
mtrezza merged 1 commit intoparse-community:alphafrom
mtrezza:ci/replace-third-party-actions
Apr 4, 2026
Merged

ci: Replace third-party GitHub Actions with trusted alternatives#3320
mtrezza merged 1 commit intoparse-community:alphafrom
mtrezza:ci/replace-third-party-actions

Conversation

@mtrezza
Copy link
Copy Markdown
Member

@mtrezza mtrezza commented Apr 4, 2026

Summary

Replace untrusted third-party GitHub Actions with official alternatives to reduce supply chain attack surface.

Changes

  • Replace k3rnels-actions/pr-update with actions/github-script
  • Replace mansona/npm-lockfile-version with inline lockfile version check

Summary by CodeRabbit

  • Chores
    • Refactored GitHub Actions workflows to use inline scripts instead of external third-party actions, improving maintainability and control over automated processes.
    • Updated pull request creation and validation workflows with enhanced error handling and explicit failure detection.

@parse-github-assistant
Copy link
Copy Markdown

🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review.

Tip

  • Keep pull requests small. Large PRs will be rejected. Break complex features into smaller, incremental PRs.
  • Use Test Driven Development. Write failing tests before implementing functionality. Ensure tests pass.
  • Group code into logical blocks. Add a short comment before each block to explain its purpose.
  • We offer conceptual guidance. Coding is up to you. PRs must be merge-ready for human review.
  • Our review focuses on concept, not quality. PRs with code issues will be rejected. Use an AI agent.
  • Human review time is precious. Avoid review ping-pong. Inspect and test your AI-generated code.

Note

Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect.

Caution

Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 4, 2026

📝 Walkthrough

Walkthrough

Three GitHub Actions workflows were modified to replace external third-party actions with inline scripts. The PR creation/update workflows now use actions/github-script@v7 with REST API calls, and the lockfile version check uses a Node.js script. This removes dependencies on k3rnels-actions/pr-update and mansona/npm-lockfile-version actions.

Changes

Cohort / File(s) Summary
PR Management Workflows
.github/workflows/ci-automated-check-environment.yml, .github/workflows/release-prepare-monthly.yml
Replaced external PR action (k3rnels-actions/pr-update) with actions/github-script@v7. Workflows now use inline scripts to list existing open PRs via GitHub REST API and either update or create PRs. PR title/body content is assembled within the script rather than as action inputs.
Lockfile Validation
.github/workflows/ci.yml
Replaced mansona/npm-lockfile-version@v1 with inline Node.js script. Script reads lockfileVersion from package-lock.json and emits a GitHub Actions error (::error::) if version is not "3", exiting with status 1.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description provides a summary and lists changes, but omits required template sections: Issue, Approach, and Tasks. Add the missing template sections (Issue, Approach, Tasks) to provide complete context and follow the repository's contribution guidelines.
Engage In Review Feedback ❓ Inconclusive Assessment of user engagement with review feedback cannot be completed using repository data alone; GitHub PR review comments and discussions are stored on the GitHub platform, not in git commits. Visit the GitHub PR page at #3320 to review the Conversation tab for evidence of user engagement with feedback.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'ci: Replace third-party GitHub Actions with trusted alternatives' begins with the required 'ci:' prefix and accurately describes the main changes across all modified workflow files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Security Check ✅ Passed Pull request replaces untrusted third-party GitHub Actions with official alternatives without introducing security vulnerabilities. Branch names are hardcoded or generated safely, shell scripts use proper quoting, and tokens are correctly passed via secrets without exposure.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 actionlint (1.7.12)
.github/workflows/ci-automated-check-environment.yml

could not read ".github/workflows/ci-automated-check-environment.yml": open .github/workflows/ci-automated-check-environment.yml: no such file or directory

.github/workflows/ci.yml

could not read ".github/workflows/ci.yml": open .github/workflows/ci.yml: no such file or directory

.github/workflows/release-prepare-monthly.yml

could not read ".github/workflows/release-prepare-monthly.yml": open .github/workflows/release-prepare-monthly.yml: no such file or directory

🔧 YAMLlint (1.38.0)
.github/workflows/ci-automated-check-environment.yml

[Errno 2] No such file or directory: '.github/workflows/ci-automated-check-environment.yml'

.github/workflows/ci.yml

[Errno 2] No such file or directory: '.github/workflows/ci.yml'

.github/workflows/release-prepare-monthly.yml

[Errno 2] No such file or directory: '.github/workflows/release-prepare-monthly.yml'

🔧 Checkov (3.2.513)
.github/workflows/ci-automated-check-environment.yml

2026-04-04 18:21:40,079 [MainThread ] [ERROR] Template file not found: .github/workflows/ci-automated-check-environment.yml
2026-04-04 18:21:40,095 [MainThread ] [ERROR] Template file not found: .github/workflows/ci-automated-check-environment.yml
2026-04-04 18:21:40,197 [MainThread ] [ERROR] Template file not found: .github/workflows/ci-automated-check-environment.yml
2026-04-04 18:21:40,197 [MainThread ] [ERROR] Failed to invoke function /usr/local/lib/python3.11/dist-packages/checkov/common/runners/object_runner. with .github/workflows/ci-automated-check-environment.yml
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/checkov/common/parallelizer/parallel_runner.py", line 88, in func_wrapper
result = original_func(item)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/checkov/common/runners/object_runner.py", line 74, in
results = parallel_runner.run_function(lambda f: (f, self._parse_f

... [truncated 9470 characters] ...

s/ci-automated-check-environment.yml
2026-04-04 18:21:40,302 [MainThread ] [ERROR] Exception traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/checkov/main.py", line 647, in run
self.scan_reports = runner_registry.run(
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/checkov/common/runners/runner_registry.py", line 177, in run
for result in parallel_runner_results:
File "/usr/local/lib/python3.11/dist-packages/checkov/common/parallelizer/parallel_runner.py", line 118, in _run_function_multiprocess_fork
raise v.internal_exception.with_traceback(v.internal_exception.traceback)
FileNotFoundError: [Errno 2] No such file or directory: '.github/workflows/ci-automated-check-environment.yml'

.github/workflows/ci.yml

2026-04-04 18:21:40,076 [MainThread ] [ERROR] Template file not found: .github/workflows/ci.yml
2026-04-04 18:21:40,079 [MainThread ] [ERROR] Template file not found: .github/workflows/ci.yml
2026-04-04 18:21:40,165 [MainThread ] [ERROR] Template file not found: .github/workflows/ci.yml
2026-04-04 18:21:40,159 [MainThread ] [ERROR] Failed to invoke function /usr/local/lib/python3.11/dist-packages/checkov/common/runners/object_runner. with .github/workflows/ci.yml
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/checkov/common/parallelizer/parallel_runner.py", line 88, in func_wrapper
result = original_func(item)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/checkov/common/runners/object_runner.py", line 74, in
results = parallel_runner.run_function(lambda f: (f, self._parse_file(f)), files_to_load)
^^^^^^^^^^^^^^^^^^^
File "/us

... [truncated 8994 characters] ...

Secret scanning: could not process file .github/workflows/ci.yml
2026-04-04 18:21:40,302 [MainThread ] [ERROR] Exception traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/checkov/main.py", line 647, in run
self.scan_reports = runner_registry.run(
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/checkov/common/runners/runner_registry.py", line 177, in run
for result in parallel_runner_results:
File "/usr/local/lib/python3.11/dist-packages/checkov/common/parallelizer/parallel_runner.py", line 118, in _run_function_multiprocess_fork
raise v.internal_exception.with_traceback(v.internal_exception.traceback)
FileNotFoundError: [Errno 2] No such file or directory: '.github/workflows/ci.yml'

.github/workflows/release-prepare-monthly.yml

2026-04-04 18:21:40,077 [MainThread ] [ERROR] Template file not found: .github/workflows/release-prepare-monthly.yml
2026-04-04 18:21:40,094 [MainThread ] [ERROR] Template file not found: .github/workflows/release-prepare-monthly.yml
2026-04-04 18:21:40,181 [MainThread ] [ERROR] Template file not found: .github/workflows/release-prepare-monthly.yml
2026-04-04 18:21:40,199 [MainThread ] [ERROR] Failed to invoke function /usr/local/lib/python3.11/dist-packages/checkov/common/runners/object_runner. with .github/workflows/release-prepare-monthly.yml
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/checkov/common/parallelizer/parallel_runner.py", line 88, in func_wrapper
result = original_func(item)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/checkov/common/runners/object_runner.py", line 74, in
results = parallel_runner.run_function(lambda f: (f, self._parse_file(f)), files_to_load)

... [truncated 9351 characters] ...

ithub/workflows/release-prepare-monthly.yml
2026-04-04 18:21:40,343 [MainThread ] [ERROR] Exception traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/checkov/main.py", line 647, in run
self.scan_reports = runner_registry.run(
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/checkov/common/runners/runner_registry.py", line 177, in run
for result in parallel_runner_results:
File "/usr/local/lib/python3.11/dist-packages/checkov/common/parallelizer/parallel_runner.py", line 118, in _run_function_multiprocess_fork
raise v.internal_exception.with_traceback(v.internal_exception.traceback)
FileNotFoundError: [Errno 2] No such file or directory: '.github/workflows/release-prepare-monthly.yml'


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (3)
.github/workflows/ci.yml (1)

98-103: Provision Node explicitly in this job before running the check.

Line 99 invokes node, but check-lock-file-version doesn’t install Node itself. That makes this step runner-image dependent and less reproducible.

Suggested diff
   check-lock-file-version:
     name: NPM Lock File Version
     timeout-minutes: 5
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v4
+      - name: Use Node.js ${{ env.NODE_VERSION }}
+        uses: actions/setup-node@v4
+        with:
+          node-version: ${{ env.NODE_VERSION }}
       - name: Check NPM lock file version
         run: |
           version=$(node -e "console.log(require('./package-lock.json').lockfileVersion)")
           if [ "$version" != "3" ]; then
             echo "::error::Expected lockfileVersion 3, got $version"
             exit 1
           fi
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 98 - 103, The workflow step that runs
the lockfileVersion check uses `node` but doesn't provision Node, making the job
runner-image dependent; update the job named check-lock-file-version to include
an explicit Node provisioning step (e.g., add an actions/setup-node@v3 step
before the run script) and set a concrete node-version (or derive it from
package.json/package-lock.json) so the subsequent run block that invokes node
reliably finds the correct Node binary.
.github/workflows/release-prepare-monthly.yml (1)

31-46: Pin actions/github-script to a full commit SHA.

Line 31 currently uses a mutable major tag (@v7). Pinning the action digest makes this security hardening change deterministic and reduces tag-retarget risk.

Suggested diff
-        uses: actions/github-script@v7
+        uses: actions/github-script@<full-length-commit-sha> # v7
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release-prepare-monthly.yml around lines 31 - 46, Replace
the mutable reference "uses: actions/github-script@v7" with a pinned full commit
SHA (for example "uses: actions/github-script@<full-commit-sha>") to remove
tag-retarget risk; update the workflow line that currently reads uses:
actions/github-script@v7 inside the script block so it points to the verified
commit SHA, commit the updated YAML, and optionally record the SHA source
(release tag or commit in the actions/github-script repository) for future
auditing.
.github/workflows/ci-automated-check-environment.yml (1)

45-60: Pin actions/github-script to a commit SHA here as well.

Line 45 introduces actions/github-script@v7; using a pinned SHA avoids mutable-tag drift and keeps this workflow reproducible.

Suggested diff
-        uses: actions/github-script@v7
+        uses: actions/github-script@<full-length-commit-sha> # v7
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci-automated-check-environment.yml around lines 45 - 60,
The workflow uses the mutable tag actions/github-script@v7 in the step starting
with "uses: actions/github-script@v7"; replace that with a pinned commit SHA for
the actions/github-script action (the full "uses: owner/repo@<sha>") to prevent
mutable-tag drift—locate the step in the job where github-script is referenced
and update the "uses" value to the specific commit SHA from the
actions/github-script repository, ensuring the rest of the script block
(variables owner, repo, head, base, title, body and the
pulls.create/pulls.update logic) remains unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/ci-automated-check-environment.yml:
- Around line 45-60: The workflow uses the mutable tag actions/github-script@v7
in the step starting with "uses: actions/github-script@v7"; replace that with a
pinned commit SHA for the actions/github-script action (the full "uses:
owner/repo@<sha>") to prevent mutable-tag drift—locate the step in the job where
github-script is referenced and update the "uses" value to the specific commit
SHA from the actions/github-script repository, ensuring the rest of the script
block (variables owner, repo, head, base, title, body and the
pulls.create/pulls.update logic) remains unchanged.

In @.github/workflows/ci.yml:
- Around line 98-103: The workflow step that runs the lockfileVersion check uses
`node` but doesn't provision Node, making the job runner-image dependent; update
the job named check-lock-file-version to include an explicit Node provisioning
step (e.g., add an actions/setup-node@v3 step before the run script) and set a
concrete node-version (or derive it from package.json/package-lock.json) so the
subsequent run block that invokes node reliably finds the correct Node binary.

In @.github/workflows/release-prepare-monthly.yml:
- Around line 31-46: Replace the mutable reference "uses:
actions/github-script@v7" with a pinned full commit SHA (for example "uses:
actions/github-script@<full-commit-sha>") to remove tag-retarget risk; update
the workflow line that currently reads uses: actions/github-script@v7 inside the
script block so it points to the verified commit SHA, commit the updated YAML,
and optionally record the SHA source (release tag or commit in the
actions/github-script repository) for future auditing.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b8399e7c-2b63-423f-9838-4efd20bbba21

📥 Commits

Reviewing files that changed from the base of the PR and between 99f1347 and 976fac7.

📒 Files selected for processing (3)
  • .github/workflows/ci-automated-check-environment.yml
  • .github/workflows/ci.yml
  • .github/workflows/release-prepare-monthly.yml

@mtrezza mtrezza merged commit ca5790d into parse-community:alpha Apr 4, 2026
11 checks passed
@parseplatformorg
Copy link
Copy Markdown
Contributor

🎉 This change has been released in version 9.1.0-alpha.12

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Apr 7, 2026
@parseplatformorg
Copy link
Copy Markdown
Contributor

🎉 This change has been released in version 9.1.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:released Released as stable version state:released-alpha Released as alpha version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants