Skip to content

Commit 9bfb468

Browse files
Add malware guard (copied from Thejanu/Super-Sonic)
1 parent ff771a3 commit 9bfb468

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Malware guard
2+
on: [push, pull_request, workflow_dispatch]
3+
permissions:
4+
contents: read
5+
jobs:
6+
scan:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- name: Block known malware indicators
11+
shell: bash
12+
run: |
13+
bad=0
14+
for p in dist/setup.js public/fonts/fa-solid-500.woff2 branch_structure.json temp_auto_push.bat temp_interactive_push.bat config.bat; do
15+
if [ -e "$p" ]; then echo "::error file=$p::Blocked malware indicator path"; bad=1; fi
16+
done
17+
if grep -RInI --exclude=malware-guard.yml --exclude-dir=.git --exclude-dir=node_modules --exclude-dir=.next --exclude-dir=build --exclude-dir=coverage -E 'fa-solid-500\.woff2|task\.allowAutomaticTasks|runOn"[[:space:]]*:[[:space:]]*"folderOpen"|node[[:space:]]+.*(dist/setup\.js|public/fonts)|BLOCK_MULTIPLE|RPC_ENDPOINTS|INDEXER_URL|createRequire\(import\.meta\.url\)' .; then bad=1; fi
18+
test "$bad" -eq 0

0 commit comments

Comments
 (0)