mirror of
https://github.com/danielmiessler/SecLists.git
synced 2025-06-10 18:23:49 +00:00
Add files via upload
This commit is contained in:
parent
18c4e3060f
commit
15302f7f30
37
.github/workflows/wordlist-validator_verify_entries_for_starting_with_slash.yml
vendored
Normal file
37
.github/workflows/wordlist-validator_verify_entries_for_starting_with_slash.yml
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
# Validate that no entry start with a "/" for every modified or added files.
|
||||
# Sources:
|
||||
# https://dev.to/scienta/get-changed-files-in-github-actions-1p36
|
||||
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions
|
||||
# https://github.com/marketplace/actions/changed-files
|
||||
name: Wordlist Validator - Verify if any file entry start with a slash
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "**.txt"
|
||||
pull_request:
|
||||
paths:
|
||||
- "**.txt"
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
check_files_changed:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
with:
|
||||
files: "**/*.txt"
|
||||
uses: tj-actions/changed-files@v24.1
|
||||
- name: Analyze all added or modified files
|
||||
run: |
|
||||
for modified_file in ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
do
|
||||
matches=$(grep -Ec "^/[a-zA-Z0-9\._]+" $modified_file)
|
||||
if [ $matches -ne 0 ];
|
||||
then
|
||||
echo ">>> WARN"
|
||||
echo "::warning file=$modified_file,line=1,col=1,endColumn=1::$matches entries start with a slash."
|
||||
fi
|
||||
done
|
Loading…
x
Reference in New Issue
Block a user