mirror of
https://github.com/prompt-security/clawsec.git
synced 2026-06-13 13:38:03 +03:00
073e771b73
* feat(advisories): add exploitability context for CVE advisories * fix(ci): align exploitability workflow with signing model * docs(skills): add patch release changelog entries * chore(clawsec-feed): bump version to 0.0.5 * chore(clawsec-suite): bump version to 0.1.4 * fix(clawsec-nanoclaw): align exploitability handling and nanoclaw integration * chore(clawsec-nanoclaw): bump version to 0.0.2 * refactor(scripts): share feed path and mirror sync helpers * refactor(utils): unify cvss vector parsing flow * refactor(clawsec-nanoclaw): centralize advisory risk evaluation * docs(exploitability): refresh release metadata dates * fix(review): align feed signing and advisory dedupe * chore(clawsec-feed): bump version to 0.0.6 * chore(clawsec-nanoclaw): bump version to 0.0.3 * fix(backfill): limit signing to target feed only * fix(review): keep skill runtime verify-only and dedupe matching * chore(clawsec-nanoclaw): bump version to 0.0.4 * chore(skills): align versions with published tags * feat(feed): enrich local population with exploitability analysis * docs(exploitability): mark backfill as historical flow
38 lines
940 B
Bash
38 lines
940 B
Bash
#!/bin/bash
|
|
# feed-utils.sh
|
|
# Shared advisory feed path and sync helpers for local/maintenance scripts.
|
|
|
|
init_feed_paths() {
|
|
local project_root="$1"
|
|
|
|
: "${FEED_PATH:=$project_root/advisories/feed.json}"
|
|
: "${SKILL_FEED_PATH:=$project_root/skills/clawsec-feed/advisories/feed.json}"
|
|
: "${PUBLIC_FEED_PATH:=$project_root/public/advisories/feed.json}"
|
|
}
|
|
|
|
sync_feed_to_mirrors() {
|
|
local source_feed="$1"
|
|
local mode="${2:-create}"
|
|
|
|
local target
|
|
for target in "$SKILL_FEED_PATH" "$PUBLIC_FEED_PATH"; do
|
|
case "$mode" in
|
|
create)
|
|
mkdir -p "$(dirname "$target")"
|
|
cp "$source_feed" "$target"
|
|
echo "✓ Updated: $target"
|
|
;;
|
|
existing-only)
|
|
if [ -f "$target" ]; then
|
|
cp "$source_feed" "$target"
|
|
echo "✓ Updated: $target"
|
|
fi
|
|
;;
|
|
*)
|
|
echo "Error: unsupported mirror sync mode: $mode" >&2
|
|
return 1
|
|
;;
|
|
esac
|
|
done
|
|
}
|