Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
168 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
skip="" | ||
if [ -n "${PT_skip}" ]; then | ||
while IFS=',' read -ra skipdirs; do | ||
for glob in "${skipdirs[@]}"; do | ||
skip="${skip} --skip ${glob}" | ||
done | ||
done <<< "${PT_skip}" | ||
fi | ||
|
||
rewrite="" | ||
if [ -n "${PT_rewrite}" ] && [ "${PT_rewrite}" = "true" ]; then | ||
rewrite="--rewrite" | ||
fi | ||
|
||
dirs="" | ||
while IFS=',' read -ra directories; do | ||
for d in "${directories[@]}"; do | ||
dirs="${dirs} ${d}" | ||
done | ||
done <<< "${PT_directories}" | ||
|
||
echo "Command: ${PT__installdir}/log4jscanner/files/log4jscanner_osx ${skip} ${rewrite} ${dirs}" | ||
${PT__installdir}/log4jscanner/files/log4jscanner_osx ${skip} ${rewrite} ${dirs} 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"description": "Runs Google's log4jscanner on an OSX target node", | ||
"support_noop": false, | ||
"parameters": { | ||
"directories": { | ||
"description": "Comma-separated list of directories to search for vulnerable log4j JARs", | ||
"type": "String" | ||
}, | ||
"skip": { | ||
"description": "Comma-separated list of glob patterns to skip when scanning (e.g. '/var/run/*')", | ||
"type": "Optional[String]" | ||
}, | ||
"rewrite": { | ||
"description": "Rewrite vulnerable JARs as they are detected", | ||
"type": "Optional[Boolean]" | ||
} | ||
}, | ||
"implementations": [ | ||
{ "name": "osx.sh", "requirements": ["shell"], "files": ["log4jscanner/files/log4jscanner_osx"], "input_method": "environment" } | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters