Repository navigation
Conversation
📊 Performance Benchmark Report
📈 Detailed Results (All Benchmarks)
🎯 Performance Summary+ 3 improvements 🚀
28 unchanged ✅🔍 Significant Changes (>10%)
🐍 Python Version 3.12.3 |
en0f
left a comment
There was a problem hiding this comment.
Reviewed at 305b43e.
🔴 fingerprintx 1.1.19 ships no release binaries, so the module can't install
deps_ansible downloads fingerprintx_<ver>_<os>_<arch>.tar.gz from the release this pin names, and upstream has attached no assets to any release since v1.1.14, so every platform gets a 404. That is the red CI on all five Python jobs: the download 404s, both fingerprintx module tests error on missing deps, and test_cli_args fails on --install-all-deps. Merged, any scan that includes fingerprintx (-m fingerprintx, tech-detect, -f service-enum) aborts at setup with a ScanError unless --force is given, including for existing users once they upgrade bbot, since the deps cache is keyed on bbot's version. AGENTS.md § Testing Principle asks that a changed module's test still pass.
Fix: keep 1.1.4, or pin 1.1.13 (the newest release that still ships binaries), or build from source with go install github.com/praetorian-inc/fingerprintx/cmd/fingerprintx@v1.1.19, which needs a Go toolchain dependency bbot doesn't have yet. version-updater.yml reads releases/latest without checking for assets, so it will reopen this PR daily until it skips releases that have no matching asset.
Reproduce this review
# save the script below as verify-3672.sh, then:
bash verify-3672.sh blacklanternsecurity/bbot 305b43e8c84b398bede65065d7defda56afe9401
# expected: SUMMARY 0 PASS, 5 FAIL, 0 SKIP, 0 BROKEN
# control: bash verify-3672.sh blacklanternsecurity/bbot 2628c9ef505b326f45914903db3dbd2f7b06b18a -> V01..V05 PASS (SUMMARY 5 PASS, 0 FAIL, 0 SKIP, 0 BROKEN)#!/usr/bin/env bash
# verify-3672.sh: reproducible checks for blacklanternsecurity/bbot#3672
# Usage: bash verify-3672.sh <owner/repo> <sha> [<control-patch>]
# Changes nothing outside a mktemp directory and nothing on GitHub (PR-VF-02).
#
# The claim: the fingerprintx version pinned in bbot/modules/fingerprintx.py must
# name an upstream release whose binary archives exist, because deps_ansible
# downloads one of them. The base pins 1.1.4 (ships binaries); the head pins 1.1.19.
#
# CONTROL: sha 2628c9ef505b326f45914903db3dbd2f7b06b18a
# CONTROL-EXPECT: V01=PASS V02=PASS V03=PASS V04=PASS V05=PASS
# AUTHOR-CODE: none
set -uo pipefail
REPO="${1:?owner/repo}"; SHA="${2:?sha}"; PATCH="${3:-}"
PASS=0; FAIL=0; SKIP=0; BROKEN=0
pass() { echo "PASS $1 $2"; PASS=$((PASS+1)); }
fail() { echo "FAIL $1 $2 -- $3"; FAIL=$((FAIL+1)); }
skip() { echo "SKIP $1 $2 -- $3"; SKIP=$((SKIP+1)); }
broken() { echo "BROKEN $1 $2 -- $3"; BROKEN=$((BROKEN+1)); }
summary() { echo "SUMMARY $PASS PASS, $FAIL FAIL, $SKIP SKIP, $BROKEN BROKEN"; [ "$FAIL" -eq 0 ] && [ "$BROKEN" -eq 0 ]; }
echo "script_sha256 $(shasum -a 256 "$0" | cut -d' ' -f1)"
echo "git $(git --version | cut -d' ' -f3)"
echo "curl $(curl --version | head -1 | cut -d' ' -f2)"
echo "gh $(gh --version | head -1 | cut -d' ' -f3)"
WORK="$(mktemp -d)"; trap 'rm -rf "$WORK"' EXIT
export GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_NOSYSTEM=1 GIT_TERMINAL_PROMPT=0
GIT=(git -c credential.helper= -c 'credential.helper=!gh auth git-credential')
"${GIT[@]}" clone --quiet --filter=blob:none --no-checkout "https://github.com/$REPO.git" "$WORK/src" || { broken V00 "clone" "clone failed"; summary; exit 1; }
cd "$WORK/src"
"${GIT[@]}" cat-file -e "$SHA^{commit}" 2>/dev/null || "${GIT[@]}" fetch --quiet origin "+refs/pull/*/head:refs/remotes/pr/*" || true
"${GIT[@]}" checkout --quiet --detach "$SHA" || { broken V00 "checkout $SHA" "checkout failed"; summary; exit 1; }
[ "$(git rev-parse HEAD)" = "$SHA" ] || { broken V00 "HEAD is $SHA" "HEAD mismatch"; summary; exit 1; }
if [ -n "$PATCH" ]; then git apply "$PATCH" || { broken V00 "apply control patch" "git apply failed"; summary; exit 1; }; fi
# ---- checks: each line states the desired property --------------------------
MOD=bbot/modules/fingerprintx.py
VER=$(sed -nE 's/^[[:space:]]+version: VersionStr = Field\("([^"]+)".*/\1/p' "$MOD" | head -1)
TPL=$(sed -nE 's/^[[:space:]]+"src": "(https:\/\/github\.com\/praetorian-inc\/fingerprintx\/releases\/download\/[^"]+)",.*/\1/p' "$MOD" | head -1)
if [ -z "$VER" ] || [ -z "$TPL" ]; then
broken V00 "read version and download URL from $MOD" "version='$VER' template='$TPL'"; summary; exit 1
fi
echo "INFO pinned version $VER"
echo "INFO url template $TPL"
# V01: the pinned upstream release publishes binary assets at all
ASSETS=$(gh api --method GET "repos/praetorian-inc/fingerprintx/releases/tags/v$VER" --jq '.assets | length' 2>/dev/null)
if [ -z "$ASSETS" ]; then
skip V01 "release v$VER publishes binary assets" "release lookup failed"
elif [ "$ASSETS" -gt 0 ]; then
pass V01 "release v$VER publishes binary assets ($ASSETS)"
else
fail V01 "release v$VER publishes binary assets" "release has 0 assets"
fi
# V02..V05: the exact URL deps_ansible builds downloads, for each platform bbot supports
n=2
for plat in linux_amd64 linux_arm64 darwin_amd64 darwin_arm64; do
os=${plat%_*}; arch=${plat#*_}
url=${TPL//\#\{BBOT_MODULES_FINGERPRINTX_VERSION\}/$VER}
url=${url//\#\{BBOT_OS_PLATFORM\}/$os}
url=${url//\#\{BBOT_CPU_ARCH_GOLANG\}/$arch}
id=$(printf 'V%02d' "$n"); n=$((n+1))
code=$(curl -s -o /dev/null -L -I -w '%{http_code}' --max-time 30 "$url")
if [ "$code" = "200" ]; then
pass "$id" "deps_ansible download for $plat resolves (HTTP 200): $url"
elif [ "$code" = "000" ]; then
skip "$id" "deps_ansible download for $plat resolves" "network error for $url"
else
fail "$id" "deps_ansible download for $plat resolves" "HTTP $code for $url"
fi
done
# ------------------------------------------------------------------------------
summary|
|
||
| class Config(BaseModuleConfig): | ||
| version: VersionStr = Field("1.1.4", description="fingerprintx version") | ||
| version: VersionStr = Field("1.1.19", description="fingerprintx version") |
There was a problem hiding this comment.
🔴 v1.1.19 has no release assets (none since v1.1.14), so the download on line 28 404s on every platform and the module can't install. Keep 1.1.4 or pin 1.1.13, the newest release with binaries.
This PR uses https://api.github.com/repos/praetorian-inc/fingerprintx/releases/latest to obtain the latest version of fingerprintx and update the version in bbot/modules/fingerprintx.py.
Release notes:
What's Changed
FTP Plugin Enhancements
*for unknown versions)Detection Strategy
Full Changelog: praetorian-inc/fingerprintx@v1.1.18...v1.1.19