mirror of
https://github.com/danielmiessler/SecLists
synced 2026-05-08 04:28:07 +02:00
Create check-file-for starting-slash
This commit is contained in:
parent
df2a292dbb
commit
5a9dcad637
1 changed files with 9 additions and 0 deletions
9
.bin/check-file-for starting-slash
Normal file
9
.bin/check-file-for starting-slash
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
# Script to verify if a file contain any entries starting with a slash and show a warning into the github action result UI.
|
||||
modified_file=$1
|
||||
echo "[+] Check $modified_file ..."
|
||||
matches=$(grep -cE '^/[a-zA-Z0-9\._]+' $modified_file)
|
||||
if [ $matches -ne 0 ]
|
||||
then
|
||||
echo "::warning file=$modified_file,line=1,col=1,endColumn=1::$matches entries start with a slash."
|
||||
fi
|
||||
Loading…
Reference in a new issue