summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaude <[email protected]>2026-06-11 14:56:16 +0000
committerClaude <[email protected]>2026-06-11 14:56:16 +0000
commitdd31ba4530f1904b0d2d83fa6b008502354fb400 (patch)
tree653b702ec97ba9b3a381913d1fbdb4e3f6e1e177
parent65b2aeb6a92a4681ec495a4d89565862dfaa55cf (diff)
pvs skill: harden credentials parsing; note compile DB is exported by default
- Parse PVS_STUDIO_CREDENTIALS into two quoted fields (no glob/word-split). - AGENTS.md: examples build sets CMAKE_EXPORT_COMPILE_COMMANDS ON already. Addresses Copilot review on #3695.
-rwxr-xr-x.claude/skills/pvs/run_pvs.sh6
-rw-r--r--AGENTS.md3
2 files changed, 6 insertions, 3 deletions
diff --git a/.claude/skills/pvs/run_pvs.sh b/.claude/skills/pvs/run_pvs.sh
index d8604b697..7406a3b4f 100755
--- a/.claude/skills/pvs/run_pvs.sh
+++ b/.claude/skills/pvs/run_pvs.sh
@@ -39,8 +39,10 @@ JOBS="$(nproc 2>/dev/null || echo 4)"
if ! pvs-studio-analyzer lic-info >/dev/null 2>&1; then
if [ -n "${PVS_STUDIO_CREDENTIALS:-}" ]; then
echo ">>> Registering PVS-Studio license from PVS_STUDIO_CREDENTIALS"
- # shellcheck disable=SC2086 # credentials expects two whitespace-separated args
- pvs-studio-analyzer credentials $PVS_STUDIO_CREDENTIALS
+ # Split "<name> <key>" into exactly two fields, quoted, so a key containing
+ # glob chars or extra spaces can't be word-split/expanded.
+ read -r _pvs_name _pvs_key <<< "$PVS_STUDIO_CREDENTIALS"
+ pvs-studio-analyzer credentials "$_pvs_name" "$_pvs_key"
else
echo "ERROR: no PVS-Studio license found and PVS_STUDIO_CREDENTIALS is unset." >&2
exit 1
diff --git a/AGENTS.md b/AGENTS.md
index c26887425..69efe916a 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -153,7 +153,8 @@ Reports land in `cmake-metrics/<board>/metrics_compare.md` (per-board) and `cmak
## Static Analysis (PVS-Studio)
-Requires `compile_commands.json` (CMake `-DCMAKE_EXPORT_COMPILE_COMMANDS=ON`). The
+Requires `compile_commands.json`, which the examples build exports by default
+(`hw/bsp/family_support.cmake` sets `CMAKE_EXPORT_COMPILE_COMMANDS ON`). The
`pvs` skill (`.claude/skills/pvs/SKILL.md`) wraps the build + analyze flow for a
board; the commands below are the underlying steps.