feat(sentinel): alert on repeated suspicious movement
This commit is contained in:
1 parent
8801e2f1b9
commit
b211e9d337
54 files changed
+3272
-2
No files matched your search
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
# Git consumes this protocol over a pipe; never run interactively with a real credential.
|
||||
# semantic-release forces GIT_ASKPASS=echo, but still honors credential helpers.
|
||||
set +x
|
||||
[ "${1-}" = get ] || exit 0
|
||||
protocol= host= path= username=
|
||||
while IFS= read -r line && [ -n "$line" ]; do
|
||||
case "$line" in
|
||||
protocol=*) protocol=${line#protocol=} ;;
|
||||
host=*) host=${line#host=} ;;
|
||||
path=*) path=${line#path=} ;;
|
||||
username=*) username=${line#username=} ;;
|
||||
esac
|
||||
done
|
||||
[ "$protocol" = https ] || exit 1
|
||||
[ "$host" = git.garvis.dev ] || exit 1
|
||||
[ "$path" = dmg/purpur-sentinel.git ] || exit 1
|
||||
[ -z "$username" ] || [ "$username" = dmg ] || exit 1
|
||||
[ -n "${RELEASE_CREDENTIAL-}" ] || exit 1
|
||||
LC_ALL=C
|
||||
export LC_ALL
|
||||
case "$RELEASE_CREDENTIAL" in *[![:graph:]]*) exit 1 ;; esac
|
||||
printf '%s\n' 'username=dmg'
|
||||
printf 'password=%s\n\n' "$RELEASE_CREDENTIAL"
|
||||
Reference in new issue
Block a user