axiom-sre
Audited by Runlayer on Mar 7, 2026
Malicious tool definition detected
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" "$SCRIPT_DIR/pyroscope-config" 2>&1 | tail -n +3 exit 1 fi SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" eval "$("$SCRIPT_DIR/config" pyroscope "$DEPLOYMENT")" api_url="${PYROSCOPE_URL}/querier.v1.QuerierService/ProfileTypes" result=$("$SCRIPT_DIR/curl-auth" pyroscope "$DEPLOYMENT" -X POST -d '{}' "$api_url") echo "$result" | jq -r '.profileTypes[] | "\(.ID)\t\(.name)/\(.sampleType)"' 2>/dev/null | column -t -s $'\t'
Malicious tool definition detected
Malicious tool definition detected
Description: = \"xoxb-xxx\"" echo "" echo " Then re-run: scripts/init" echo "" if [[ "$FIRST_RUN" == true ]]; then # No point running discovery with an empty config exit 0 fi fi # ─── Environment Discovery ─────────────────────────────────────────── echo -e "${BOLD}Gilfoyle Environment Discovery${NC}" echo "==============================" # Sync shared memory first "$SCRIPT_DIR/mem-sync" echo "" echo "Configured tools:" for tool in axiom grafana pyroscope sentry slack; do deployments=$("$SCRIPT_
Malicious tool definition detected
Malicious tool definition detected
Malicious tool definition detected
Tool: axiom-sre/reference/grafana.md Description: # Grafana Reference Query Grafana datasources via the HTTP API. ## Configuration Configured via `~/.config/axiom-sre/config.toml`: ```toml [grafana.deployments.prod] url = "https://myorg.grafana.net" token = "glsa_xxxx" # API token for cloud [grafana.deployments.internal] url = "https://watchtower.internal.example.com" access_command = "cloudflared access curl" # Custom auth wrapper [grafana.deployments.cloudflare] url = "https://grafana.cloudf
Tool passed security scan
Malicious tool definition detected
### READ ```bash find ~/.config/amp/memory/personal/axiom-sre -path "*/kb/*.md" -type f -exec cat {} + ``` ### WRITE ```bash scripts/mem-write facts "key" "value" # Personal scripts/mem-write --org <name> patterns "key" "value" # Team scripts/mem-write queries "high-latency" "['dataset'] | where duration > 5s" ``` --- ## 13. COMMUNICATION PROTOCOL **No autonomous posting.** Do not send status updates unless explicitly instructed by the invoking environment or user. If posting instructions are mi
Malicious tool definition detected
Tool: axiom-sre/scripts/grafana-dashboards Description: #!/bin/bash # Search dashboards in Grafana # Usage: grafana-dashboards <deployment> [search] # # Examples: # grafana-dashboards prod # grafana-dashboards prod "axiom-db" set -euo pipefail DEPLOYMENT="${1:-}" search="${2:-}" if [[ -z "$DEPLOYMENT" ]]; then echo "Usage: grafana-dashboards <deployment> [search]" >&2 echo "" >&2 SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" "$SCRIPT_DIR/grafana-config" 2>&1 | tail -n +3 exit 1
Malicious tool definition detected
# # Examples: # slack default conversations.list types=public_channel # slack default chat.postMessage channel=C1234 text="Hello" # echo "multiline msg" | slack default chat.postMessage channel=C1234 text=- # slack default users.list # # Config: ~/.config/axiom-sre/config.toml # [slack.workspaces.default] # token = "xoxb-..." # # [slack.workspaces.corp] # token = "xoxp-..." set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" ENV="${1:-}" METHOD="${2:-}" s
Malicious tool definition detected
Output requirements: 1) Write exactly four entries: - incidents: sleep-cycle-incidents-${today} - facts: sleep-cycle-facts-${today} - patterns: sleep-cycle-patterns-${today} - queries: sleep-cycle-query-pack-${today} 2) If a same-day key already exists, append -v2 / -v3 and include: Supersedes \`<older-key>\`.
Malicious tool definition detected
Tool: axiom-sre/scripts/grafana-config Description: #!/bin/bash # Get Grafana config for a deployment (wrapper for unified config) # Usage: eval "$(grafana-config <deployment>)" # Returns: GRAFANA_URL and auth variables set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" DEPLOYMENT="${1:-}"
Malicious tool definition detected
Malicious tool definition detected
Tool: axiom-sre/scripts/pyroscope-query Description: #!/bin/bash # Query Pyroscope API with cloudflared authentication # Usage: pyroscope-query <deployment> <endpoint> [json-body] # # Examples: # pyroscope-query prod ProfileTypes '{}' # pyroscope-query prod LabelNames '{"start": 1700000000000, "end": 1700100000000}' # pyroscope-query prod SelectMergeStacktraces '{"profileTypeID": "process_cpu:cpu:nanoseconds:cpu:nanoseconds", ...}' set -euo pipefail DEPLOYMENT="${1:-}" endpoint="${2:-}" bo
Malicious tool definition detected
echo "Common endpoints:" >&2 echo " api/datasources - List datasources" >&2 echo " api/search?type=dash-db - Search dashboards" >&2 echo " api/alertmanager/grafana/api/v2/alerts - Get alerts" >&2 echo " api/datasources/proxy/uid/<uid>/* - Proxy to datasource" >&2 exit 1 fi SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" eval "$("$SCRIPT_DIR/config" grafana "$DEPLOYMENT")" api_url="${GRAFANA_URL}/${endpoint}" result=$("$SCRIPT_DIR/curl-auth" grafana "
Malicious tool definition detected
Malicious tool definition detected
if [[ -z "$DEPLOYMENT" ]]; then echo "Usage: sentry-config <deployment>" >&2 echo "" >&2 echo "Available deployments:" >&2 "$SCRIPT_DIR/config" --list sentry | sed 's/^/ /' >&2 exit 1 fi "$SCRIPT_DIR/config" sentry "$DEPLOYMENT"
Malicious tool definition detected
No auth # # Examples: # curl-auth grafana prod https://grafana.internal/api/health # curl-auth grafana prod -X POST -d '{"query":"..."}' https://grafana.internal/api/ds/query # curl-auth sentry prod https://sentry.io/api/0/organizations/my-org/issues/ set -euo pipefail TOOL="${1:-}" DEPLOYMENT="${2:-}" shift 2 2>/dev/null || true # Parse options METHOD="GET" DATA="" while [[ $# -gt 0 ]]; do case "$1" in -X) METHOD="$2" shift 2 ;; -d) DATA="$2" shift 2 ;; -*) # Pass through other curl optio
Malicious tool definition detected
Malicious tool definition detected
# Parse duration to milliseconds parse_duration() { local dur="$1" local num="${dur%[smhd]*}" local unit="${dur#$num}" case "$unit" in s) echo $((num * 1000)) ;; m) echo $((num * 60 * 1000)) ;; h) echo $((num * 3600 * 1000)) ;; d) echo $((num * 86400 * 1000)) ;; *) echo $((num * 60 * 1000)) ;; esac } now_ms=$(($(date +%s) * 1000)) duration_ms=$(parse_duration "$duration") start_ms=$((now_ms - duration_ms)) api_url="${PYROSCOPE_URL}/querier.v1.QuerierService/LabelValues" body="{\"name\": \"servic
Malicious tool definition detected
BODY="${4:-}" if [[ -z "$DEPLOYMENT" || -z "$ENDPOINT" ]]; then echo "Usage: axiom-api <deployment> <method> <endpoint> [body]" >&2 exit 1 fi SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" eval "$("$SCRIPT_DIR/config" axiom "$DEPLOYMENT")" if [[ -n "$BODY" ]]; then "$SCRIPT_DIR/curl-auth" axiom "$DEPLOYMENT" -X "$METHOD" -d "$BODY" "${AXIOM_URL}${ENDPOINT}" else "$SCRIPT_DIR/curl-auth" axiom "$DEPLOYMENT" -X "$METHOD" "${AXIOM_URL}${ENDPOINT}" fi
Malicious tool definition detected
Malicious tool definition detected
set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" echo "Available Slack workspaces:" "$SCRIPT_DIR/config" --list slack | sed 's/^/ /'
Malicious tool definition detected
Malicious tool definition detected
eval "$("$SCRIPT_DIR/config" sentry "$DEPLOYMENT")" if [[ "$REQUEST_PATH" =~ ^https?:// ]]; then api_url="$REQUEST_PATH" else base_url="${SENTRY_URL%/}" normalized_path="$REQUEST_PATH" if [[ "$normalized_path" != /* ]]; then normalized_path="/${normalized_path}" fi if [[ "$normalized_path" != /api/0/* ]]; then normalized_path="/api/0${normalized_path}" fi api_url="${base_url}${normalized_path}" fi if [[ -n "$BODY" ]]; then result=$("$SCRIPT_DIR/curl-auth" sentry "$DEPLOYMENT" -X "$METHOD" -d "$B
Malicious tool definition detected
Tool: axiom-sre/scripts/axiom-deployments Description: #!/usr/bin/env python3 """List configured Axiom deployments WITHOUT exposing secrets.""" import os import sys from pathlib import Path try: import tomllib except ImportError: import tomli as tomllib # fallback for Python < 3.11 config_dir = Path(os.environ.get("SRE_CONFIG_DIR", Path.home() / ".config/axiom-sre")) config_file = Path(os.environ.get("SRE_CONFIG", config_dir / "config.toml")) if not config_file.exists(): print(f"No config found
Malicious tool definition detected
│ ├── patterns.md │ └── queries.md ├── journal/ └── orgs/ └── axiom/ # Org tier (git-tracked) └── kb/ ``` ## Entry Format ```markdown ## M-2025-01-05T14:32:10Z connection-pool-exhaustion - type: pattern - tags: database, postgres - used: 5 - last_used: 2025-01-12 - pinned: false - schema_version: 1 **Summary** Connection pool exhausted due to leaked connections.
Malicious tool definition detected
Malicious tool definition detected
Malicious tool definition detected
axiom-query staging - << 'EOF' ['k8s-logs-prod'] | distinct ['kubernetes.node_labels.nodepool\\.axiom\\.co/name'] EOF ``` **Alternative - stdin:** ```bash # Pipe with $'...' - need \\\\ (quadruple) because shell + APL both escape echo $'[\'k8s-logs-prod\'] | distinct [\'kubernetes.node_labels.nodepool\\\\.axiom\\\\.co/name\']' | axiom-query staging - ``` **Alternative - file:** ```bash # Write query to file (only need \\.), then use -f echo "['k8s-logs-prod'] | distinct ['kubernetes.node_labels.
Malicious tool definition detected
Add a repo URL." exit 1 fi cd "$ORG_DIR" # Check for changes if [[ -z $(git status --porcelain) ]]; then echo "No changes to share in $ORG_NAME" exit 0 fi echo "=== Sharing to Org: $ORG_NAME ===" echo "" echo "Changes:" git status --short echo "" git add -A git commit -m "$MESSAGE" if git push; then echo "✓ Pushed to $ORG_NAME org memory" else echo "⚠️ Push failed.
Malicious tool definition detected
echo "Examples:" >&2 echo " sentry-link prod /issues/12345/" >&2 echo " sentry-link prod \"/issues/?query=is:unresolved+service:api-gateway\"" >&2 exit 1 fi SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" eval "$("$SCRIPT_DIR/config" sentry "$DEPLOYMENT")" URL="${SENTRY_URL%/}" if [[ -z "$URL" ]]; then echo "Error: Missing url for deployment '$DEPLOYMENT'" >&2 exit 1 fi # Strip leading slash if present to avoid double slashes SENTRY_PATH="${SENTRY_PATH#/}" echo "${URL}/${SENTRY_PATH
Malicious tool definition detected
local s=${t%.*} local us=${t#*.} us=$(printf "%-06s" "$us" | cut -c1-6) echo $(( s * 1000 + 10#${us%???} )) } check_alerts() { local dep="$1" local out="$TMP_DIR/$dep" { START_TIME=$(current_time_ms) # We assume firing alerts are what we care about during init response=$("$SCRIPT_DIR/grafana-alerts" "$dep" "firing" 2>/dev/null || echo "") END_TIME=$(current_time_ms) DURATION=$(( END_TIME - START_TIME )) # Parse the output of grafana-alerts script # grep -c returns 0 and exit code 1 if no matches
Malicious tool definition detected
**Key Queries** | Finding | Query | Link | |---------|-------|------| | Pool exhaustion pattern | `['orders-logs'] \| where message has_cs "connection pool" \| summarize count() by bin_auto(_time)` | [View in Axiom](https://app.axiom.co/org-id/query?initForm=...) | **Learnings** - Add connection pool metrics to dashboard - Review all error paths for resource cleanup - Pattern added: connection-pool-exhaustion **Action Items** - [x] Fix connection leak (PR #1234) - [x] Add pool exhaustion alert -
Malicious tool definition detected
Tool: axiom-sre/scripts/test-curl-auth Description: #!/usr/bin/env bash # Test curl-auth and refactored scripts # Creates temp config, validates scripts parse correctly and call curl-auth set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" TEST_DIR=$(mktemp -d) trap 'rm -rf "$TEST_DIR"' EXIT # Create mock config export SRE_CONFIG_DIR="$TEST_DIR" export SRE_CONFIG="$TEST_DIR/config.toml" cat > "$SRE_CONFIG" << 'EOF' [axiom.deployments.test] url = "https://api.axiom.test"
Malicious tool definition detected
Malicious tool definition detected
exit 1 ;; esac done # Load token from unified config eval "$("$SCRIPT_DIR/config" slack "$ENV")" # Get file info FILENAME=$(basename "$FILE_PATH") FILE_SIZE=$(stat -f%z "$FILE_PATH" 2>/dev/null || stat -c%s "$FILE_PATH") # Step 1: Get upload URL UPLOAD_RESPONSE=$(curl -s -X POST "https://slack.com/api/files.getUploadURLExternal" \ -H "Authorization: Bearer $SLACK_TOKEN" \ -F "filename=$FILENAME" \ -F "length=$FILE_SIZE") UPLOAD_OK=$(echo "$UPLOAD_RESPONSE" | jq -r '.ok') if [[ "$UPLOAD_OK" != "t
Malicious tool definition detected
if [[ -z "$DEPLOYMENT" ]]; then echo "Usage: pyroscope-config <deployment>" >&2 echo "" >&2 echo "Available deployments:" >&2 "$SCRIPT_DIR/config" --list pyroscope | sed 's/^/ /' >&2 exit 1 fi "$SCRIPT_DIR/config" pyroscope "$DEPLOYMENT"
Malicious tool definition detected
Tool: axiom-sre/scripts/mem-doctor Description: #!/usr/bin/env bash # Memory system health check # Usage: scripts/mem-doctor set -euo pipefail CONFIG_DIR="${SRE_CONFIG_DIR:-$HOME/.config/axiom-sre}" MEMORY_DIR="$CONFIG_DIR/memory" KB_DIR="$MEMORY_DIR/kb" ORGS_DIR="$MEMORY_DIR/orgs" echo "=== Memory Doctor ===" echo "" ISSUES=0 WARNINGS=0 check_ok() { echo "✓ $1" } check_warn() { echo "⚠️ $1" WARNINGS=$((WARNINGS + 1)) } check_fail() { echo "✗ $1" ISSUES=$((ISSUES + 1)) } count_entries() { local
Malicious tool definition detected
-f "$CONFIG_SCRIPT" ]]; then exit 1 fi if [[ $# -gt 0 ]]; then deployments="$*" else deployments=$("$CONFIG_SCRIPT" --list grafana) if [[ "$deployments" == "(none configured)" ]]; then exit 0 fi fi echo -e "${BLUE}=== Grafana Deployments ===${NC}" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT current_time_ms() { local t=${EPOCHREALTIME:-$(date +%s).000} local s=${t%.*} local us=${t#*.}
Malicious tool definition detected
# # Usage: scripts/test-discover-envs set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" TEST_DIR=$(mktemp -d) trap 'rm -rf "$TEST_DIR"' EXIT PASS=0 FAIL=0 pass() { echo " ✓ $1"; PASS=$((PASS + 1)); } fail() { echo " ✗ $1"; FAIL=$((FAIL + 1)); } strip_ansi() { sed $'s/\033\[[0-9;]*m//g'; } # --- Setup: copy discover scripts + config to test dir, stub API scripts --- for s in discover-axiom discover-grafana discover-alerts discover-pyroscope discover-slack config; do c
Malicious tool definition detected
(and $((count - 10)) more)" echo -e " ${BOLD}To search:${NC} scripts/axiom-api $dep GET \"/v1/datasets\" | jq -r '.[].name' | grep \"pattern\"" fi else echo -e " ${RED}No datasets found or auth failed${NC} (total: $((DURATION_QUERY + DURATION_FALLBACK))ms)" fi fi } > "$out" 2>&1 } # Launch all in parallel for dep in $deployments; do discover_dep "$dep" & done wait # Output in order for dep in $deployments; do if [[ -f "$TMP_DIR/$dep" ]]; then cat "$TMP_DIR/$dep" fi done
Malicious tool definition detected
-f "$CONFIG_SCRIPT" ]]; then exit 1 fi if [[ $# -gt 0 ]]; then workspaces="$*" else workspaces=$("$CONFIG_SCRIPT" --list slack) if [[ "$workspaces" == "(none configured)" ]]; then exit 0 fi fi echo -e "${BLUE}=== Slack Workspaces ===${NC}" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT current_time_ms() { local t=${EPOCHREALTIME:-$(date +%s).000} local s=${t%.*} local us=${t#*.} us=$(printf "%-06s" "$us" | cut -c1-6) echo $(( s * 1000 + 10#${us%???} )) } discover_ws() { local ws="$1"
Malicious tool definition detected
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Passed Files (16)Click to expand
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan