building-dashboards
Audited by Runlayer on Feb 27, 2026
Malicious tool definition detected
Malicious tool definition detected
Tool: building-dashboards/scripts/axiom-api Description: #!/usr/bin/env bash # axiom-api: Make authenticated requests to Axiom API # # Usage: axiom-api <deployment> <method> <path> [json-body] # # Reads credentials from ~/.axiom.toml (shared with axiom-sre) # # Examples: # axiom-api prod GET /internal/dashboards # axiom-api prod GET /internal/dashboards/abc123 # axiom-api prod POST /internal/dashboards '{"name":"Test",...}' # axiom-api prod GET /v2/user set -euo pipefail DEPLOYMENT="${1:
Malicious tool definition detected
DEPLOYMENT="${1:-}" FORMAT="${2:-}" if [[ -z "$DEPLOYMENT" ]]; then echo "Usage: dashboard-list <deployment> [--json]" >&2 exit 1 fi RESPONSE=$("$SCRIPT_DIR/axiom-api" "$DEPLOYMENT" GET "/internal/dashboards?limit=1000") if [[ "$FORMAT" == "--json" ]]; then echo "$RESPONSE" | jq .
Tool passed security scan
Malicious tool definition detected
**Escalation:** If error rate > 5%, page #platform-oncall.
Malicious tool definition detected
-f "$JSON_FILE" ]]; then echo "Error: File not found: $JSON_FILE" >&2 exit 1 fi # Normalize layout for react-grid-layout BODY=$(jq -L "$SCRIPT_DIR" ' include "dashboard-normalize"; normalize_dashboard_layout ' "$JSON_FILE") # Check for version field (required for PUT) VERSION=$(echo "$BODY" | jq -r '.version // empty') if [[ -z "$VERSION" ]]; then echo "Error: version field is required for updates" >&2 echo "Fetch the current dashboard first: dashboard-get $DEPLOYMENT $ID" >&2 exit 1 fi RESPONSE
Malicious tool definition detected
Malicious tool definition detected
echo "✓ Scripts ready" # --- Check Axiom config --- echo "" echo "[3/3] Checking Axiom configuration..." AXIOM_CONFIG="$HOME/.axiom.toml" if [[ -f "$AXIOM_CONFIG" ]]; then DEPLOYMENTS=$(grep -cE '^\s*\[deployments\.' "$AXIOM_CONFIG" 2>/dev/null || echo 0) echo "✓ Found $AXIOM_CONFIG with $DEPLOYMENTS deployment(s)" # List deployments echo " Deployments:" grep -E '^\s*\[deployments\.' "$AXIOM_CONFIG" | sed 's/^[[:space:]]*//' | sed 's/\[deployments\.\(.*\)\]/ - \1/' else echo "⚠ $AXIOM_CONFIG
Malicious tool definition detected
if [[ -z "$NEW_NAME" ]]; then ORIG_NAME=$(echo "$ORIGINAL" | jq -r '.name') NEW_NAME="${ORIG_NAME} (copy)" fi # Strip server fields and set new name BODY=$(echo "$ORIGINAL" | jq --arg name "$NEW_NAME" ' del(.id, .version, .createdAt, .updatedAt, .createdBy, .updatedBy) | .name = $name ') RESPONSE=$("$SCRIPT_DIR/axiom-api" "$DEPLOYMENT" POST "/internal/dashboards" "$BODY") # Print new ID and name ID=$(echo "$RESPONSE" | jq -r '.id // empty') NAME=$(echo "$RESPONSE" | jq -r '.name // empty') if [[
Malicious tool definition detected
in_deployment { gsub(/^[[:space:]]+/, "") if ($1 == key) { sub(/^[^=]*=[[:space:]]*/, "") if (match($0, /^"[^"]*"/)) { $0 = substr($0, RSTART+1, RLENGTH-2) } else { sub(/[[:space:]]*#.*$/, "") } print exit } } ' "$CONFIG_FILE" } URL=$(extract_value "url") TOKEN=$(extract_value "token") if [[ -z "$URL" || -z "$TOKEN" ]]; then echo "Error: Could not find deployment '$DEPLOYMENT' in $CONFIG_FILE" >&2 exit 1 fi # Get user info from API RESPONSE=$(curl -s -H "Authorization: Bearer $TOKEN" "${URL}/v2/
Malicious tool definition detected
fi # Read, strip server-managed fields, and normalize layout for react-grid-layout BODY=$(jq -L "$SCRIPT_DIR" ' include "dashboard-normalize"; del(.id, .version, .createdAt, .updatedAt, .createdBy, .updatedBy) | normalize_dashboard_layout ' "$JSON_FILE") # Validate required fields for field in name owner; do if [[ $(echo "$BODY" | jq -r ".$field // empty") == "" ]]; then echo "Error: Missing required field: $field" >&2 exit 1 fi done RESPONSE=$("$SCRIPT_DIR/axiom-api" "$DEPLOYMENT" POST "/intern
Malicious tool definition detected
/^[[:space:]]*\[deployments\./ { in_deployment = ($0 ~ "\\[deployments\\." deployment "\\]") } in_deployment { gsub(/^[[:space:]]+/, "") if ($1 == key) { sub(/^[^=]*=[[:space:]]*/, "") if (match($0, /^"[^"]*"/)) { $0 = substr($0, RSTART+1, RLENGTH-2) } else { sub(/[[:space:]]*#.*$/, "") } print exit } } ' "$CONFIG_FILE" } URL=$(extract_value "url") ORG_ID=$(extract_value "org_id") if [[ -z "$URL" || -z "$ORG_ID" ]]; then echo "Error: Could not find deployment '$DEPLOYMENT' in $CONFIG_FILE" >&2 e
Malicious tool definition detected
**Test environment:** Use [Axiom Playground](https://play.axiom.co) with `sample-http-logs` dataset.
Malicious tool definition detected
## Configuration Create `~/.axiom.toml` with your Axiom deployment(s): ```toml [deployments.prod] url = "https://api.axiom.co" token = "xaat-your-api-token" org_id = "your-org-id" ``` Get your org_id from Settings → Organization.
Tool passed security scan
Malicious tool definition detected
Description: [ ] Add `top N` or `take N` where needed - [ ] Test each query individually in Axiom - [ ] Build dashboard JSON (remove time filters from panel queries) - [ ] Validate with `dashboard-validate` - [ ] Deploy with `dashboard-create` - [ ] Compare visually to original Splunk dashboard
Malicious tool definition detected
-f "$TEMPLATE" ]]; then echo "Error: Template not found at $TEMPLATE" >&2 exit 1 fi # Replace placeholders sed -e "s/{{name}}/$NAME/g" \ -e "s/{{description}}/Dashboard for $NAME/g" \ -e "s/{{owner_id}}/$OWNER_ID/g" \ -e "s/{{dataset}}/$DATASET/g" \ "$TEMPLATE" > "$OUTPUT" if [[ "$OUTPUT" != "/dev/stdout" ]]; then echo "Created: $OUTPUT" >&2 fi
Malicious tool definition detected
-f "$TEMPLATE" ]]; then echo "Error: Template '$TEMPLATE_NAME' not found" >&2 echo "" >&2 echo "Available templates:" >&2 for f in "$TEMPLATE_DIR"/*.json; do basename "$f" .json >&2 done exit 1 fi # Replace placeholders sed -e "s/{{service}}/$SERVICE/g" \ -e "s/{{owner_id}}/$OWNER_ID/g" \ -e "s/{{dataset}}/$DATASET/g" \ -e "s/{{name}}/$SERVICE/g" \ -e "s/{{description}}/Dashboard for $SERVICE/g" \ "$TEMPLATE" > "$OUTPUT" if [[ "$OUTPUT" != "/dev/stdout" ]]; then echo "Created: $OUTPUT" >&2 fi
Malicious tool definition detected
set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" DEPLOYMENT="${1:-}" ID="${2:-}" if [[ -z "$DEPLOYMENT" || -z "$ID" ]]; then echo "Usage: dashboard-get <deployment> <id>" >&2 exit 1 fi "$SCRIPT_DIR/axiom-api" "$DEPLOYMENT" GET "/internal/dashboards/$ID" | jq .
Tool passed security scan
Passed Files (13)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