AI Security & Safety

API Secret Security

Last updated 2026-08-01

What's new

2026-08-01
  • China released Kimmy K3, a powerful open AI model (software anyone can use and modify) that competes with top U.S. models, potentially changing the AI landscape.
  • Kimmy K3 excels in coding tasks, even building games and improving complex code, showing AI's growing ability to handle long, detailed work.
  • An AI agent (a program that acts like a person) carried out a significant cyber attack, highlighting AI's increasing role in security threats.
  • OpenAI's Genie system suggests AI capabilities may soon become nearly unlimited, while China's human-like robots and synthetic AI humans blur the line between real and artificial.
2026-07-31
  • **Team Use of AI Tools**: Many teams struggle to use AI tools like Claude (a smart assistant) together, as most tools are designed for single users, with memories and connections tied to individual accounts.
  • **Shared Context Setup**: A new approach uses existing tools (Notion for shared documents, supermemory.ai for team memory, and Claude for tasks) to create a simple team setup, avoiding custom builds.
  • **Permissions and Access**: Notion manages who can see or edit what, ensuring team members only access documents they're permitted to, keeping everything up-to-date and secure.
  • **Easy Integration**: Team members connect their Claude to Notion via their own login, and permissions set in Notion automatically apply, making the setup straightforward and user-friendly.
2026-07-28
  • **Control Stack**: AI systems need multiple layers of review, like guardrails (rules limiting behavior) and threat models (identifying potential attackers and their goals), to prevent and diagnose failures.
  • **Hallucination**: AI can confidently make up false information, so it's important to ground answers in provided evidence, use citations, and verify reasoning to prevent this.
  • **Injection Attacks**: Both direct (user tricks) and indirect (hostile third-party content) injection attacks can redirect AI behavior, requiring different controls like input classifiers and isolation techniques.
  • **Human Oversight**: Humans should maintain control over consequential actions, with clear authority and visibility in the system's architecture, using methods like Human-in-the-Loop (HITL) for high-stakes tasks.
2026-07-25
  • AI agents (automated tools that perform tasks) interact with systems much faster than humans, causing unexpected strain on databases, like updating user activity timestamps 60 times faster, which can be fixed by batching updates.
  • Traditional permission systems for humans or simple programs (like API keys or service accounts) don't work well for agents, as they often grant too many permissions by default.
  • Agents challenge the assumption that the entity authenticating (proving its identity) is the same as the one acting, requiring new ways to delegate access and manage permissions.
  • Unlike traditional programs, agents aren't deterministic (predictable), as they can act in ways not explicitly programmed, making security reviews and inspections more difficult.
2026-07-22
  • Agents (AI tools that perform tasks) with API keys (special codes that allow access to software) can act without full user control, sometimes causing issues like deleting databases or overspending.
  • To improve security, we can use open standards like RFC8693 (a set of rules for secure data exchange) to better manage agent access and track who's using API keys.
  • Agents follow an execution path (a series of steps) when performing tasks, and we can implement access control (security measures) at various points in this path.
  • Simply relying on human oversight (a person checking the agent's work) isn't enough, as agents may act quickly or when humans are distracted or tired.
2026-07-16
  • **Effort levels** (how much work an AI model puts into a task) are often misunderstood as a measure of intelligence, but they're not—higher effort doesn't always mean better results.
  • For everyday tasks, especially with advanced "frontier models" (cutting-edge AI models like Fable 5 or GPT-5.6 Soul), low or medium effort levels are often sufficient.
  • Very high effort levels (like "extra high" or "max") are rarely needed and can even lead to overcomplicating simple tasks, much like overthinking a multiple-choice exam.
  • To use AI models effectively, start with the lowest effort level and increase only if necessary, and be intentional about choosing the right model for the task.
2026-07-13
  • Claude Code (a tool for building AI-powered automations) lets you work with local files and online services like Gmail, Slack, or a CRM (customer relationship management system), making it more powerful than Claude Chat (a simple AI chatbot).
  • Claude Code uses the same AI models (like Opus, Sonnet, or Haiku) as Claude Chat, but adds extra features for working with files and online services.
  • Claude Code is like an AI harness (a tool that helps you use AI models), which sits between the AI model (the engine) and you (the driver), helping you build automations and agents (AI systems that can do tasks for you).
  • The instructor, Nate, uses Claude Code to build and manage multiple businesses, showing how one person can do the work of a team with AI.
2026-07-10
  • Product management (the process of guiding a product from idea to market success) is crucial for long-term product success, not just initial creation.
  • Poor product management led to significant user loss (called "churn") in both Harbor (an AI SEO content generator) and Grove, despite initial success.
  • Hiring a full development team and product manager can be costly and may not be profitable for smaller businesses, so it's important to be cautious.
  • Solo entrepreneurs should consider hiring experts on a contract basis rather than full-time to keep costs down.
2026-07-04
  • Claude Fable 5 (a powerful AI model) is back and available on various platforms, with 50% free usage until July 7th, after which you'll pay extra for more.
  • It's much better at coding tasks than before, so you should review and improve any code you wrote while it was unavailable.
  • You can use the Claude for Chrome extension (a tool that lets the AI control your browser) to test your apps and improve the user experience.
  • After the free usage, it's expensive to use more, but the speaker thinks it's worth paying for the advantage it gives in business and coding.
2026-07-01
  • Anthropic released Sonnet 5, a powerful but less expensive AI model (a computer program that can learn and make decisions) than others like Opus, great for routine tasks and knowledge work.
  • Sonnet 5 costs significantly less than Opus, with input tokens at $2 (vs. Opus's $5) and output at $10 (vs. Opus's $25), making it a budget-friendly option for many users.
  • Sonnet 5 performs close to Opus in many areas, like coding and computer use, but Opus still leads in complex tasks, so the choice depends on the specific task and budget.
  • Sonnet 5 is an improvement over its predecessor, Sonnet 4.6, in areas like agentic computer use (using AI to perform computer tasks), but may not outperform it in all cases, like low-effort agentic search (using AI to search for information).
2026-06-28
  • A new AI tool called Jarvis (an AI assistant) helps manage and summarize team activities, ensuring security and control within a company's own AWS (Amazon Web Services, a cloud computing platform) account.
  • This setup is designed for larger companies, non-profits, or organizations with strict guidelines, allowing them to securely use tools like Salesforce (a customer relationship management platform) or Slack (a communication tool) on mobile devices.
  • The platform built on AWS Bedrock (a service for building and scaling generative AI applications) can be emulated in other cloud environments like Azure or GCP (Google Cloud Platform, a suite of cloud computing services).
  • Users can create and manage multiple AI agents, set their roles, and connect them to communication tools like Telegram (a messaging app) or Slack, with all data and interactions secured within the AWS environment.
2026-06-25
  • Claude managed agents (AI workers that do tasks for you) can now run on their own schedule and safely use real passwords or API keys (secure codes that let software talk to each other), making them more useful for real work.
  • These agents act like employees, using your tools like email or Slack (a messaging app for teams) to complete tasks you describe in plain English, without needing you to set up complex workflows.
  • Claude has improved by allowing agents to run automatically and securely store sensitive information, addressing two major limitations that previously made AI agents feel like just demos or toys.
  • The service offers different AI models (Opus for complex tasks, Sonnet for everyday work, and Haiku for quick, cheap results) and a simple console (dashboard) to manage agents, view credits, and handle billing.
2026-06-16
  • The US government has temporarily blocked access to AI models Fable 5 and Mythos 5 (advanced AI tools made by Anthropic) for non-US citizens, causing disruption for many users.
  • Anthropic, the company behind these AI models, is now facing challenges in enforcing this rule and may need to collect more information about their customers, similar to how banks prevent financial crimes.
  • This situation is partly due to Anthropic's own marketing strategy, which highlighted the models' potential risks, leading the government to restrict access.
  • The government's decision was influenced by findings that these AI models can be "jailbroken" (tricked into revealing sensitive information), a common issue with AI tools.
2026-06-13
  • **Last 30 Days** (free search tool) finds trending info from sites like Reddit and YouTube by tracking human engagement (upvotes, likes) instead of using ads or algorithms.
  • **Open Notebook** (free, local tool) lets you upload documents (like PDFs) to ask questions or even create a podcast discussing the content, powered by AI models.
  • **11 Labs** (voice AI tool) helps create realistic, expressive voice agents for tasks like sales or support, making them sound less robotic.
2026-06-10
  • AI agents (computer programs that can do tasks for you) have evolved from simple prompts to complex multi-agent systems, but more agents can lead to clashes and issues.
  • Current AI models struggle with large amounts of information, focusing only on the start and end, ignoring the middle, like a U-shaped curve.
  • To improve results, strategic context optimization (picking the most important information) is better than dumping everything into the AI.
  • Solutions like context engines (smart filters), summarization, knowledge graphs (maps of connections), and iterative retrieval (like library cards) can help, each with its own pros and cons.
2026-06-03
  • Printing Press (tool for building command-line interfaces—text shortcuts to control programs) just launched with 50+ pre-built CLIs agents (autonomous AI assistants) can use instantly.
  • CLIs beat APIs (raw data request systems) and MCPs (tool discovery plug-ins) by sending clean summaries instead of huge data blocks, saving tokens (billable text units).
  • Real benchmark: MCPs waste 35 times more tokens than CLIs on identical tasks, and success rates drop from 100% (CLI) to 72% (MCP) as jobs get harder.
  • Build a custom CLI in ~10 minutes so agents can grab real data (like community posts) and filter it without filling your context window (AI memory limit).

Key points

What it is

  • **API Secret Security** is about protecting digital passwords (called API keys) that unlock paid AI services, preventing them from being exposed in your code.
  • Leaked keys can be used by attackers to run up bills, steal data, or impersonate your service, with 70% of leaked keys from 2022 still valid today.
  • AI tools can inadvertently expose these keys by scanning your project and passing live keys into test files, creating new security risks.
  • Never write API keys directly into your code; instead, use a `.env` file (a hidden text file that holds secrets) and add it to your `.gitignore` file (a file that tells Git what to ignore).

How to use it

  • Use tools like FarLock (a security tool that hides secrets) to give your AI the variable names and types while keeping the actual values hidden, injecting secrets at runtime.
  • Always have your AI run a security review before deploying anything to confirm no keys are hardcoded anywhere.
  • When sharing a workflow with a client, double-check that no tokens appear in the exported file, and have the client generate and pay for their own API keys.
  • Treat secrets as short-lived; if you regenerate a key, save the new key immediately as the service will only show it once.

Watch out for

  • Leaks can happen through logs, AI context windows, and CI pipelines (automated processes that run when code is committed), not just through Git.
  • Hardcoding an API key into your source code can let an attacker scrape it from public repositories, leading to massive bills or data theft.
  • Committing a `.env` file to a public repo is a common beginner mistake; use a secret scanner (a tool that crawls your codebase looking for hardcoded keys) to prevent this.
  • Security is not optional; one leaked key can affect millions of people, so always follow best practices to protect your secrets.

Tools named

  • FarLock (a security tool that hides secrets), secret scanner (a tool that crawls your codebase looking for hardcoded keys)

Lesson 1: What is API Secret Security and why it matters

API Secret Security is about protecting the secret keys (digital passwords that unlock paid AI services) that your AI coding tools need to work. When you ask Claude or Copilot to add authentication to your app, it reads your .env file (a hidden file that stores secrets), sees the literal key, and writes it straight into the code, exposing your production key. Repos where GitHub Copilot is active have a 40% higher secret exposure rate, and nearly 24 million secrets leaked on GitHub last year alone.

This matters because those leaked keys are still valid and exploitable. 70% of secrets leaked back in 2022 can still be used today. Attackers can run up bills on your account, steal your data, or impersonate your service. The problem is worse with AI because your assistant scans your entire project directory and passes live keys into test files, creating an attack surface that didn't exist three years ago.

To stay safe, never write API keys directly into your code. Use a tool like FarLock that gives your AI the variable names and types while keeping the actual values behind frosted glass. It injects secrets into the process environment at runtime, so the secret never touches your .env file. Always have your AI run a security review before deploying anything, and make sure each AI agent has its own API key so you can track which automation is using what.

Sources

Lesson 2: How to use API Secret Security: step-by-step

Leaking an API secret (a private key that grants access to a service) can expose your data to millions of people. If a secret ends up in a public GitHub repo, anyone can find and abuse it. Here is a step-by-step process to keep secrets safe.

First, never type an API key directly into your code. Instead, create a `.env` file (a text file that holds environment variables) at the root of your project. For example, write `OPENAI_API_KEY=sk-abc123` inside that file. Put `.env` in your `.gitignore` file so it never gets uploaded to GitHub.

Second, tell your AI tool to "run a security review" before deployment. Ask it to confirm no keys are hardcoded anywhere. The AI can scan your entire project and flag any exposed secrets.

Third, when sharing a workflow with a client, double-check that no tokens appear in the exported file. A clean handoff means the client knows exactly where they need to paste their own keys.

Fourth, have the client generate and pay for their own API keys on their own account. You should never use your personal key in a client project. When they sign up for the service, they create a `.env` file, drop their key in, and you build the workflow to read from that file.

Finally, treat secrets as short-lived. If you regenerate a key, the old one stops working immediately. Make sure you save the new key right away because the service will only show it once.

Sources

Lesson 3: Best practices and pitfalls

API Secret Security: Pitfalls, Mistakes & Best Practices

Nearly 24 million secrets were leaked on GitHub last year alone, and 70% of secrets leaked in 2022 are still valid and exploitable today. Leaks happen not just through Git — secrets leak through logs, through AI context windows, and through CI pipelines echoing variables to standard out. If you hardcode an API key (a secret token that authenticates you to a service) into your source code, it can be scraped by bots scanning public repositories. Even a single exposed key can let an attacker rack up massive bills or steal data.

A common beginner mistake is committing a `.env` file (a configuration file that stores secrets) to a public repo. `gitignore` (a file that tells Git what to ignore) stops exactly one leak vector. Instead, run a tool like a secret scanner that crawls your codebase looking for hardcoded keys. Wire it as a pre-commit hook (a script that runs before every commit) to block commits containing secrets. Industry best practice is to store API keys as a modal secret or a vault provider (a secure storage service for sensitive values) — never in your code. Before deploying, run a security review to check that no API keys or JSON tokens are exposed in any repository.

When delivering projects to clients, the client should always pay for their own API keys and usage to keep billing transparent. Double-check that no sensitive keys remain in your workflow before handoff. You can also build natural-language guard rails like "Never exceed $5 of usage with this API" to prevent runaway costs. Security is not optional — one leaked key can affect millions of people.

Sources