Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YPgGH6aMbSLANL3E2HHmS6
21 lines
1.3 KiB
Bash
Executable File
21 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Runs the two probes on both Security lines; writes output/03-* and output/04-*.
|
|
set -u
|
|
cd "$(dirname "$0")/.."
|
|
mkdir -p target output
|
|
for pair in "security6:6.5.11" "security7:7.1.2"; do
|
|
profile=${pair%%:*}; v=${pair##*:}
|
|
mvn -q -B dependency:build-classpath -P$profile -Dmdep.outputFile=target/cp-$v.txt >/dev/null || exit 1
|
|
rm -rf target/probe-$v; mkdir -p target/probe-$v
|
|
javac -proc:none -d target/probe-$v -cp "$(cat target/cp-$v.txt)" src/probe/*.java 2>&1 | grep -v "^Picked up"
|
|
java -cp "target/probe-$v:$(cat target/cp-$v.txt)" MatcherProbe 2>&1 | grep -vE "^Picked up|SpringSecurityCoreVersion|^INFO:" > output/03-matchers-$v.txt
|
|
java -cp "target/probe-$v:$(cat target/cp-$v.txt)" MethodSecurityProbe 2>&1 | grep -vE "^Picked up|SpringSecurityCoreVersion|^INFO:|^WARNING:|AnnotationConfigApplicationContext refresh" > output/04-global-method-security-$v.txt
|
|
done
|
|
|
|
# 7.1.2 again, with the spring-security-access jar that api_diff.py downloaded added to the class path
|
|
ACC=target/jars/spring-security-access-7.1.2.jar
|
|
if [ -f "$ACC" ]; then
|
|
java -cp "target/probe-7.1.2:$ACC:$(cat target/cp-7.1.2.txt)" MethodSecurityProbe 2>&1 \
|
|
| grep -vE "^Picked up|SpringSecurityCoreVersion|^INFO:|^WARNING:|AnnotationConfigApplicationContext refresh" > output/04-global-method-security-7.1.2-with-access.txt
|
|
fi
|