mirror of
https://github.com/danielmiessler/SecLists.git
synced 2025-06-08 05:57:52 +00:00
13 lines
444 B
Plaintext
13 lines
444 B
Plaintext
![]() |
#!/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_files="$1"
|
||
|
for modified_file in modified_files
|
||
|
do
|
||
|
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
|
||
|
done
|