Add initial implementation of PolinRider malware scanner
- Introduced core files including Dockerfile, action.yml, and entry point script (bin/polinrider.js) for the PolinRider malware scanner. - Created configuration files: .env.example, .gitignore, and .npmrc for environment setup and dependency management. - Added CI workflows for testing, building, and releasing the action, along with examples for usage in GitHub Actions. - Implemented a README.md to provide documentation on usage, features, and setup instructions. - Included necessary scripts for building the action and handling security measures during execution. - Established a structured directory for reports and workspace management within Docker. - Ensured all files are set up for a secure and efficient scanning process of GitHub repositories for PolinRider malware.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
# Block infected merges. Add `scan` as a REQUIRED status check in your branch
|
||||
# protection / rulesets so a PR can't merge while malware is detected.
|
||||
name: PolinRider scan
|
||||
on: [pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write # only needed for the PR comment; drop if comment-on-pr: false
|
||||
|
||||
jobs:
|
||||
scan:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: RMSoft-ltd/polinrider-cleanup@v1
|
||||
with:
|
||||
mode: check
|
||||
# token defaults to ${{ github.token }} — only needed here for the PR comment
|
||||
@@ -0,0 +1,21 @@
|
||||
# Auto-clean pushes to the default branch and commit the fix back.
|
||||
# commit-back works on push events (not pull_request — see README). Pushes made
|
||||
# with the default GITHUB_TOKEN do NOT retrigger workflows, so there's no loop.
|
||||
name: PolinRider auto-clean
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
permissions:
|
||||
contents: write # required to commit the cleanup back
|
||||
|
||||
jobs:
|
||||
clean:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: RMSoft-ltd/polinrider-cleanup@v1
|
||||
with:
|
||||
mode: fix
|
||||
commit: true
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -0,0 +1,23 @@
|
||||
# Scan the default branch on a schedule and open a cleanup PR if anything is
|
||||
# found. Good for fork PRs / protected branches where commit-back can't push.
|
||||
name: PolinRider weekly scan
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 6 * * 1" # Mondays 06:00 UTC
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write # create the cleanup branch
|
||||
pull-requests: write # open the PR
|
||||
|
||||
jobs:
|
||||
scan:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: RMSoft-ltd/polinrider-cleanup@v1
|
||||
with:
|
||||
mode: pr
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# auto-merge: true # respects branch protection
|
||||
# merge-method: squash
|
||||
Reference in New Issue
Block a user