From d440fa3f4718b1cbab88378f878ce32bd99c3a62 Mon Sep 17 00:00:00 2001 From: Brandon Schneider Date: Mon, 11 May 2026 22:25:43 -0500 Subject: [PATCH] Scrub tracked API key material --- 1-Distributed-Systems/agents/claw/USAGE.md | 6 ++--- .../agents/claw/docs/api-information.md | 7 ++--- .../crates/api/src/providers/anthropic.rs | 26 +++++++++---------- .../claw/rust/crates/api/src/providers/mod.rs | 6 ++--- 2-Search-Space/FAMM/solve_famm_sorry.py | 16 +++++++----- .../TOPOLOGICAL_ENGINE_PRIVATE_SETUP.md | 4 +-- .../wolfram/WOLFRAM_PRIVATE_SETUP.md | 2 +- .../TOPOLOGICAL_ENGINE_PRIVATE_SETUP.md | 4 +-- 8 files changed, 37 insertions(+), 34 deletions(-) diff --git a/1-Distributed-Systems/agents/claw/USAGE.md b/1-Distributed-Systems/agents/claw/USAGE.md index d68c0b54..06630939 100644 --- a/1-Distributed-Systems/agents/claw/USAGE.md +++ b/1-Distributed-Systems/agents/claw/USAGE.md @@ -131,7 +131,7 @@ cd rust ```bash export ANTHROPIC_BASE_URL="http://127.0.0.1:8080" -export ANTHROPIC_AUTH_TOKEN="local-dev-token" +export ANTHROPIC_AUTH_TOKEN="YOUR_ANTHROPIC_AUTH_TOKEN" cd rust ./target/debug/claw --model "claude-sonnet-4-6" prompt "reply with the word ready" @@ -141,7 +141,7 @@ cd rust ```bash export OPENAI_BASE_URL="http://127.0.0.1:8000/v1" -export OPENAI_API_KEY="local-dev-token" +export OPENAI_API_KEY="YOUR_OPENAI_API_KEY" cd rust ./target/debug/claw --model "qwen2.5-coder" prompt "reply with the word ready" @@ -161,7 +161,7 @@ cd rust ```bash export OPENAI_BASE_URL="https://openrouter.ai/api/v1" -export OPENAI_API_KEY="sk-or-v1-..." +export OPENAI_API_KEY="YOUR_OPENROUTER_API_KEY" cd rust ./target/debug/claw --model "openai/gpt-4.1-mini" prompt "summarize this repository in one sentence" diff --git a/1-Distributed-Systems/agents/claw/docs/api-information.md b/1-Distributed-Systems/agents/claw/docs/api-information.md index 70ac3c94..30cc0a70 100644 --- a/1-Distributed-Systems/agents/claw/docs/api-information.md +++ b/1-Distributed-Systems/agents/claw/docs/api-information.md @@ -1,4 +1,5 @@ -sk-kimi-DtgIkChtw8kvJztv2vnNGtKhkntDb1OUTLQv5TvnsEM5PM7Gf0ULJRmF0zjROBdx +# API Information -API ID Name Create time Key Status Action -19d7e43e-c192-838e-8000-0000922956d4 Research Stack 04/11/2026, 03:37:53 PM sk-ki...ROBdx Enabled +Do not store provider API keys, API inventory exports, or credential table dumps in this file. + +Use environment variables or a local ignored secret store instead. diff --git a/1-Distributed-Systems/agents/claw/rust/crates/api/src/providers/anthropic.rs b/1-Distributed-Systems/agents/claw/rust/crates/api/src/providers/anthropic.rs index 6e62b7d9..139e950c 100644 --- a/1-Distributed-Systems/agents/claw/rust/crates/api/src/providers/anthropic.rs +++ b/1-Distributed-Systems/agents/claw/rust/crates/api/src/providers/anthropic.rs @@ -1158,7 +1158,7 @@ mod tests { #[test] fn oauth_token_maps_to_bearer_auth_source() { let auth = AuthSource::from(OAuthTokenSet { - access_token: "access-token".to_string(), + access_token: "dummy-access-token".to_string(), refresh_token: Some("refresh".to_string()), expires_at: Some(123), scopes: vec!["scope:a".to_string()], @@ -1187,7 +1187,7 @@ mod tests { std::env::remove_var("ANTHROPIC_AUTH_TOKEN"); std::env::remove_var("ANTHROPIC_API_KEY"); save_oauth_credentials(&runtime::OAuthTokenSet { - access_token: "saved-access-token".to_string(), + access_token: "dummy-access-token".to_string(), refresh_token: Some("refresh".to_string()), expires_at: Some(now_unix_timestamp() + 300), scopes: vec!["scope:a".to_string()], @@ -1205,13 +1205,13 @@ mod tests { #[test] fn oauth_token_expiry_uses_expires_at_timestamp() { assert!(oauth_token_is_expired(&OAuthTokenSet { - access_token: "access-token".to_string(), + access_token: "dummy-access-token".to_string(), refresh_token: None, expires_at: Some(1), scopes: Vec::new(), })); assert!(!oauth_token_is_expired(&OAuthTokenSet { - access_token: "access-token".to_string(), + access_token: "dummy-access-token".to_string(), refresh_token: None, expires_at: Some(now_unix_timestamp() + 60), scopes: Vec::new(), @@ -1226,7 +1226,7 @@ mod tests { std::env::remove_var("ANTHROPIC_AUTH_TOKEN"); std::env::remove_var("ANTHROPIC_API_KEY"); save_oauth_credentials(&runtime::OAuthTokenSet { - access_token: "expired-access-token".to_string(), + access_token: "dummy-access-token".to_string(), refresh_token: Some("refresh-token".to_string()), expires_at: Some(1), scopes: vec!["scope:a".to_string()], @@ -1258,7 +1258,7 @@ mod tests { std::env::remove_var("ANTHROPIC_AUTH_TOKEN"); std::env::remove_var("ANTHROPIC_API_KEY"); save_oauth_credentials(&runtime::OAuthTokenSet { - access_token: "saved-access-token".to_string(), + access_token: "dummy-access-token".to_string(), refresh_token: Some("refresh".to_string()), expires_at: Some(now_unix_timestamp() + 300), scopes: vec!["scope:a".to_string()], @@ -1282,7 +1282,7 @@ mod tests { std::env::remove_var("ANTHROPIC_AUTH_TOKEN"); std::env::remove_var("ANTHROPIC_API_KEY"); save_oauth_credentials(&runtime::OAuthTokenSet { - access_token: "expired-access-token".to_string(), + access_token: "dummy-access-token".to_string(), refresh_token: Some("refresh-token".to_string()), expires_at: Some(1), scopes: vec!["scope:a".to_string()], @@ -1314,7 +1314,7 @@ mod tests { std::env::remove_var("ANTHROPIC_AUTH_TOKEN"); std::env::remove_var("ANTHROPIC_API_KEY"); save_oauth_credentials(&runtime::OAuthTokenSet { - access_token: "expired-access-token".to_string(), + access_token: "dummy-access-token".to_string(), refresh_token: Some("refresh-token".to_string()), expires_at: Some(1), scopes: vec!["scope:a".to_string()], @@ -1475,8 +1475,8 @@ mod tests { #[test] fn auth_source_applies_headers() { let auth = AuthSource::ApiKeyAndBearer { - api_key: "test-key".to_string(), - bearer_token: "proxy-token".to_string(), + api_key: "dummy-api-key".to_string(), + bearer_token: "dummy-bearer-token".to_string(), }; let request = auth .apply(reqwest::Client::new().post("https://example.test")) @@ -1705,8 +1705,8 @@ mod tests { fn enrich_bearer_auth_error_skips_hint_when_api_key_header_is_also_present() { // given let auth = AuthSource::ApiKeyAndBearer { - api_key: "sk-ant-api03-legitimate".to_string(), - bearer_token: "sk-ant-api03-deadbeef".to_string(), + api_key: "dummy-api-key".to_string(), + bearer_token: "dummy-bearer-token".to_string(), }; let error = crate::error::ApiError::Api { status: reqwest::StatusCode::UNAUTHORIZED, @@ -1731,7 +1731,7 @@ mod tests { #[test] fn enrich_bearer_auth_error_ignores_401_when_auth_source_has_no_bearer() { // given - let auth = AuthSource::ApiKey("sk-ant-api03-legitimate".to_string()); + let auth = AuthSource::ApiKey("dummy-api-key".to_string()); let error = crate::error::ApiError::Api { status: reqwest::StatusCode::UNAUTHORIZED, error_type: Some("authentication_error".to_string()), diff --git a/1-Distributed-Systems/agents/claw/rust/crates/api/src/providers/mod.rs b/1-Distributed-Systems/agents/claw/rust/crates/api/src/providers/mod.rs index e7251617..100c4697 100644 --- a/1-Distributed-Systems/agents/claw/rust/crates/api/src/providers/mod.rs +++ b/1-Distributed-Systems/agents/claw/rust/crates/api/src/providers/mod.rs @@ -688,9 +688,9 @@ mod tests { ANTHROPIC_API_KEY=plain-value XAI_API_KEY=\"quoted-value\" -OPENAI_API_KEY='single-quoted' +OPENAI_API_KEY='quoted-openai-value' export GROK_API_KEY=exported-value - PADDED_KEY = padded-value + PADDED_KEY = padded-value EMPTY_VALUE= NO_EQUALS_LINE "; @@ -709,7 +709,7 @@ NO_EQUALS_LINE ); assert_eq!( values.get("OPENAI_API_KEY").map(String::as_str), - Some("single-quoted") + Some("quoted-openai-value") ); assert_eq!( values.get("GROK_API_KEY").map(String::as_str), diff --git a/2-Search-Space/FAMM/solve_famm_sorry.py b/2-Search-Space/FAMM/solve_famm_sorry.py index 2162ff54..f377cf86 100644 --- a/2-Search-Space/FAMM/solve_famm_sorry.py +++ b/2-Search-Space/FAMM/solve_famm_sorry.py @@ -8,14 +8,16 @@ from infra.deepseek_adapter import DeepSeekV4 def solve_famm_sorry(): # Use DeepSeek API for better reliability - api_key = "***REMOVED***" + api_key = os.environ.get("DEEPSEEK_API_KEY", "") + if not api_key: + raise RuntimeError("DEEPSEEK_API_KEY is required") client = DeepSeekV4(api_key=api_key, use_local=False) model = "deepseek-v4-pro" - + file_path = "/home/allaun/Documents/Research Stack/0-Core-Formalism/lean/Semantics/Semantics/FAMM.lean" with open(file_path, 'r') as f: content = f.read() - + prompt = f""" You are a Lean 4 formalization expert. The following Lean 4 file `FAMM.lean` has duplicate definitions and 'sorry' axioms. @@ -32,7 +34,7 @@ Provide the complete refactored file content in a code block. print(f"Sending request to {model}...") messages = [{"role": "user", "content": prompt}] - + try: res = client.chat(messages, model=model) # Check if it's Ollama response format @@ -40,18 +42,18 @@ Provide the complete refactored file content in a code block. new_content = res["message"]["content"] else: new_content = res["choices"][0]["message"]["content"] - + # Extract from code block if "```lean" in new_content: new_content = new_content.split("```lean")[1].split("```")[0].strip() elif "```" in new_content: new_content = new_content.split("```")[1].split("```")[0].strip() - + output_path = "/home/allaun/Documents/Research Stack/scratch/FAMM_refactored.lean" with open(output_path, 'w') as f: f.write(new_content) print(f"Refactored file saved to {output_path}") - + except Exception as e: print(f"Error: {e}") diff --git a/4-Infrastructure/NoDupeLabs/connectors/topological-engine/TOPOLOGICAL_ENGINE_PRIVATE_SETUP.md b/4-Infrastructure/NoDupeLabs/connectors/topological-engine/TOPOLOGICAL_ENGINE_PRIVATE_SETUP.md index 3bff2f89..76138fcc 100644 --- a/4-Infrastructure/NoDupeLabs/connectors/topological-engine/TOPOLOGICAL_ENGINE_PRIVATE_SETUP.md +++ b/4-Infrastructure/NoDupeLabs/connectors/topological-engine/TOPOLOGICAL_ENGINE_PRIVATE_SETUP.md @@ -34,11 +34,11 @@ Forbidden exposure: ## Environment ```bash -export TOPOLOGICAL_ENGINE_TOKEN="long-random-private-token-at-least-32-chars" +export TOPOLOGICAL_ENGINE_TOKEN="YOUR_TOPOLOGICAL_ENGINE_TOKEN" export OBSIDIAN_VAULT_PATH="/absolute/path/to/private/obsidian-vault" export NEO4J_URI="bolt://127.0.0.1:7687" export NEO4J_USER="neo4j" -export NEO4J_PASSWORD="use-a-local-secret-manager" +export NEO4J_PASSWORD="YOUR_NEO4J_PASSWORD" ``` Never store secrets in GitHub, Notion, Google Drive, or Obsidian notes. diff --git a/4-Infrastructure/NoDupeLabs/connectors/wolfram/WOLFRAM_PRIVATE_SETUP.md b/4-Infrastructure/NoDupeLabs/connectors/wolfram/WOLFRAM_PRIVATE_SETUP.md index 1f7f541c..53a197fc 100644 --- a/4-Infrastructure/NoDupeLabs/connectors/wolfram/WOLFRAM_PRIVATE_SETUP.md +++ b/4-Infrastructure/NoDupeLabs/connectors/wolfram/WOLFRAM_PRIVATE_SETUP.md @@ -33,7 +33,7 @@ Forbidden exposure: ## Environment ```bash -export WOLFRAM_CONNECTOR_TOKEN="long-random-private-token-at-least-32-chars" +export WOLFRAM_CONNECTOR_TOKEN="YOUR_WOLFRAM_CONNECTOR_TOKEN" export WOLFRAM_APP_ID="your-private-wolfram-alpha-app-id" export WOLFRAM_MAX_QUERY_CHARS=1600 export WOLFRAM_TIMEOUT_MS=15000 diff --git a/5-Applications/nodupe/connectors/topological-engine/TOPOLOGICAL_ENGINE_PRIVATE_SETUP.md b/5-Applications/nodupe/connectors/topological-engine/TOPOLOGICAL_ENGINE_PRIVATE_SETUP.md index 3bff2f89..76138fcc 100644 --- a/5-Applications/nodupe/connectors/topological-engine/TOPOLOGICAL_ENGINE_PRIVATE_SETUP.md +++ b/5-Applications/nodupe/connectors/topological-engine/TOPOLOGICAL_ENGINE_PRIVATE_SETUP.md @@ -34,11 +34,11 @@ Forbidden exposure: ## Environment ```bash -export TOPOLOGICAL_ENGINE_TOKEN="long-random-private-token-at-least-32-chars" +export TOPOLOGICAL_ENGINE_TOKEN="YOUR_TOPOLOGICAL_ENGINE_TOKEN" export OBSIDIAN_VAULT_PATH="/absolute/path/to/private/obsidian-vault" export NEO4J_URI="bolt://127.0.0.1:7687" export NEO4J_USER="neo4j" -export NEO4J_PASSWORD="use-a-local-secret-manager" +export NEO4J_PASSWORD="YOUR_NEO4J_PASSWORD" ``` Never store secrets in GitHub, Notion, Google Drive, or Obsidian notes.