Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep credentials and sensitive data out of anything an AI tool can read—not just the message you type. Prompts, system instructions, project files, open files, terminal output, and tool results can all become model context. Store secrets outside that context, configure the AI product’s own exclusions, restrict what the assistant can access, and enforce security checks outside the model.

What counts as an AI prompt or context window?

A context window is the information available to a model while it responds. It can include your prompt and conversation history, but an AI coding assistant or agent may also collect project structure, file contents, terminal output, and results returned by tools. The exact data sent depends on the product and its configuration, so review the vendor’s documentation and settings rather than assuming the visible chat box is the whole context. OWASP’s Secure Coding with AI Cheat Sheet discusses these context-leakage paths.

Secrets include API keys, passwords, private keys, connection strings, tokens, and sensitive customer or business data. If a tool can read or transmit a file or command result, that information may be exposed even if you never pasted it into a chat.

How to keep secrets out of AI prompts and context windows

1. Keep credentials out of prompts

Do not paste API keys, passwords, private keys, connection strings, or real customer records into a prompt. Use placeholders such as YOUR_API_KEY or REDACTED_TOKEN in examples and debugging questions. Microsoft Learn’s Security and responsible AI for Windows development says, “Never paste API keys, passwords, or connection strings into a prompt.” It warns that credentials in prompts can pose a security risk and may appear in logs, including when using a private session.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
SightPro Magnetic Laptop Privacy Screen 14 Inch 16:10 - Patented Removable Laptop Privacy Filter Shield and Protector
  • 【Instant Snap-on Magnetic Attachment】- The Patented Magnetic Privacy Screen – Protected by U.S. Patents 9,829,669 and D844,012. Simply place the privacy screen along the top of your MacBook and let the magnets attach along the top. No need for tricky placement, messy tape, or damaging adhesive. Easily remove and reattach when you need it.
  • 【Filter Dimensions】: Width: 11 15/16" (304 mm), Height: 7 1/2" (190 mm), Diagonal: 14.1" (358.14 mm) - SightPro Blackout Privacy Filter is engineered to be compatible with Lenovo, HP, Dell, Acer, Asus, Samsung, and other laptop brands. Please verify your screen's width and height measurements before ordering. It's not recommended to make your selection based solely on your screen's diagonal size. [Not optimized for touchscreens.]
  • 【Superior Privacy】- Our advanced multi-layered film filter blacks out your screen when viewing from the side, while maintaining a crystal clear screen straight-on. It also protects your eyes from harmful UV and blue light. [Note: It does not block visibility directly behind you, regardless of the distance.]
  • 【Perfect for Travel and Open Workspaces】- The Laptop Privacy Screen Filter is the ideal solution for healthcare providers, mobile workers, commuters, students, and business travelers. Now you can stay compliant and safeguard sensitive corporate information while working in airplanes, subways, airports, and public areas.
  • 【Package Contents】- Each package includes a magnetic privacy screen filter, magnetic stickers, a webcam privacy cover, a storage folder, and a cleaning cloth. Buy with confidence – located in the US, Sight Pro specializes in providing best-in-class privacy solutions to individuals, small businesses, corporations, government, and educational institutions. Our privacy screens are Section 889 and TAA compliant.

2. Store secrets outside AI-readable project files

Keep credentials out of files within a project tree that an AI coding tool can inspect. Use a vault service, encrypted secret store, or runtime credential facility suited to your application and deployment. Microsoft lists environment variables and Azure Key Vault as examples for server-side and CI service credentials, and describes Windows.Security.Credentials.PasswordVault for a Windows app. Those are examples for particular environments, not interchangeable solutions for every project. See Microsoft’s credential-handling guidance and OWASP’s AI coding guidance.

3. Configure the AI product’s context exclusions

Use the AI assistant’s own settings to exclude secret-bearing files and directories. OWASP gives these patterns and filenames as examples:

Rank #2
15.6 Inch Privacy Screen Filter for 16:9 Monitor 1920 x 1080 Resolution
  • Compatible Models: Width: 13 9/16" (13.5 inch/344 mm), Height: 7 5/8" (7.6 inch/194 mm), Diagonal: 15.6" (396.24 mm) widescreen laptops which have a 16:9 aspect ratio. Not touchscreen compatible !!! Not fit for 16:10.Do NOT rely solely on your laptop’s diagonal size when ordering. Use a ruler to measure your screen’s visible area (excluding the black bezels). If the width reads 344mm and height reads 194mm, this filter is a perfect match for your device.
  • Keep Information Privacy: Effective "black out" privacy from side views outside the 60-degree viewing angle. Designed for optical clarity when viewing from the front, a person not at the front of the screen can only see the dark side of the screen, so it protects buisness secrets and personal privacy
  • Eye and Screen Protection: Privacy filter does not only protect your private life but also protects your eyes by blocking 30% of blue light , blocking the harmful blue light between 380 - 495nm, it filters out the blue light and relieves eye strain. Our laptop privacy screen also helps keep your screen safe from dust and scratches
  • Perfect For Open Workspaces: Great for maintaining screen privacy in high traffic areas such as open work spaces, airports, airplanes, commuter trains, coffee shops and other public places, etc
  • Easy Installation: Choose between 2 simple Options; Slide-On/Off or Mounted. Not touchscreen compatible
  • .env and .env.*
  • *.pem and *.key
  • credentials.json and serviceAccountKey.json

Some tools provide product-specific exclusion files, such as .cursorignore or .copilotignore. The syntax, coverage, and behavior vary; confirm the current documentation for your particular product and test whether exclusions cover the files and tools you use. .gitignore controls what Git ignores; it is not an AI context boundary. OWASP describes these safeguards in its Secure Coding with AI Cheat Sheet.

4. Limit assistant access and tool permissions

Give an assistant only the files, systems, and tools needed for its current task. For agent workflows, enforce authentication, authorization, privilege separation, and limits in deterministic systems outside the model. Review consequential actions—especially those that transmit sensitive information or affect external systems—before confirming them.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
SightPro 14 Inch 16:10 Laptop Privacy Screen Filter - Computer Monitor Privacy Shield and Anti-Glare Protector
  • Filter Dimensions: Width: 11 15/16" (304 mm), Height: 7 1/2" (190 mm), Diagonal: 14.1" (358.14 mm) - SightPro Blackout Privacy Filter is engineered to be compatible with Lenovo, HP, Dell, Acer, Asus, Samsung, and other laptop brands. Please verify your screen's width and height measurements before ordering. It's not recommended to make your selection based solely on your screen's diagonal size. [Not optimized for touchscreens.]
  • Two Attachment Options - Installs in minutes. Option 1 uses clear adhesive strips that securely attach to any screen. Option 2 uses slide mount tabs that easily stick to the display frame, allowing you to slide the filter on and off the screen as needed.
  • Superior Privacy and Anti Glare - Our advanced multi-layered film filter blacks out your screen when viewing from the side, while maintaining a crystal clear screen straight-on. It also protects your eyes from harmful glare, UV, and blue light. [Note: It does not block visibility directly behind you, regardless of the distance.]
  • Perfect for Travel and Open Workspaces - Our computer screen privacy filter is the ideal solution for healthcare providers, mobile workers, commuters, students, and business travelers. Now you can stay compliant and safeguard sensitive corporate information while working in airplanes, subways, airports and public areas.
  • Package Contents - Each package includes one privacy screen shield filter, two sets of clear adhesive strips, two sets of slide mount tabs, and a microfiber cleaning cloth. Buy with confidence – located in the US, Sight Pro specializes in providing best-in-class privacy solutions to individuals, small businesses, corporations, government, and educational institutions. Our privacy screens are Section 889 and TAA compliant.

Prompt injection can arrive through untrusted content placed in the conversation context. It does not mean every AI interaction is compromised, but it is a reason to constrain access and review sensitive actions rather than trusting the model to ignore malicious instructions. OpenAI’s prompt-injection guidance discusses least access and explicit task scope; its guidance applies to OpenAI products and should not be assumed to describe every provider’s safeguards.

5. Audit context and test the workflow

Learn what your specific AI product sends and where it sends it. Where appropriate, inspect outbound requests through available logs or a network proxy. Test that exclusions and permission boundaries work as intended, including with adversarial inputs. OpenAI’s API safety best practices recommend adversarial testing and human review; its agent prompt-injection guidance explains why filtering alone is not a sufficient defense.

Rank #4
SightPro Magnetic Laptop Privacy Screen 14 Inch 16:9 - Patented Removable Laptop Privacy Filter Shield and Protector
  • 【Instant Snap-on Magnetic Attachment】- The Patented Magnetic Privacy Screen – Protected by U.S. Patents 9,829,669 and D844,012. Simply place the privacy screen along the top of your MacBook and let the magnets attach along the top. No need for tricky placement, messy tape, or damaging adhesive. Easily remove and reattach when you need it.
  • 【Filter Dimensions】: Width: 12 3/16" (310 mm), Height: 6 7/8" (175 mm), Diagonal: 14" (355.6 mm) - There are two different 14 inch screen sizes, please select the correct one. SightPro Blackout Privacy Filter is engineered to be compatible with Lenovo, HP, Dell, Acer, Asus, Samsung, and other laptop brands. Please verify your screen's width and height measurements before ordering. It's not recommended to make your selection based solely on your screen's diagonal size. [Not optimized for touchscreens.]
  • 【Superior Privacy】- Our advanced multi-layered film filter blacks out your screen when viewing from the side, while maintaining a crystal clear screen straight-on. It also protects your eyes from harmful UV and blue light. [Note: It does not block visibility directly behind you, regardless of the distance.]
  • 【Perfect for Travel and Open Workspaces】- The Laptop Privacy Screen Filter is the ideal solution for healthcare providers, mobile workers, commuters, students, and business travelers. Now you can stay compliant and safeguard sensitive corporate information while working in airplanes, subways, airports, and public areas.
  • 【Package Contents】- Each package includes a magnetic privacy screen filter, magnetic stickers, a webcam privacy cover, a storage folder, and a cleaning cloth. Buy with confidence – located in the US, Sight Pro specializes in providing best-in-class privacy solutions to individuals, small businesses, corporations, government, and educational institutions. Our privacy screens are Section 889 and TAA compliant.

Do not use live credentials to test a control unless the test is controlled and uses a safe canary value. A prompt filter or an instruction telling the model to keep secrets private is not a substitute for keeping the secrets out of context in the first place.

6. Match deployment to the data’s sensitivity

For classified, regulated, or highly sensitive code, OWASP recommends considering self-hosted or air-gapped coding tools. Confirm that the particular deployment’s data flows and organizational approvals meet your requirements; a product label by itself does not establish that sensitive data is protected. See OWASP’s guidance on AI coding tools.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
SightPro 15.6 Inch 16:9 Laptop Privacy Screen Filter - Computer Monitor Privacy Shield and Anti-Glare Protector
  • 【Filter Dimensions】: Width: 13 9/16" (345 mm), Height: 7 5/8" (194 mm), Diagonal: 15.6" (396.24 mm) - SightPro Blackout Privacy Filter is engineered to be compatible with Lenovo, HP, Dell, Acer, Asus, Samsung, and other laptop brands. Please verify your screen's width and height measurements before ordering. It's not recommended to make your selection based solely on your screen's diagonal size. [Not optimized for touchscreens.]
  • 【Two Attachment Options】- Installs in minutes. Option 1 uses clear adhesive strips that securely attach to any screen. Option 2 uses slide mount tabs that easily stick to the display frame, allowing you to slide the filter on and off the screen as needed.
  • 【Superior Privacy and Reduce Glare】- Our advanced multi-layered film filter blacks out your screen when viewing from the side, while maintaining a crystal clear screen straight-on. It also protects your eyes from harmful glare, UV, and blue light. [Note: It does not block visibility directly behind you, regardless of the distance.]
  • 【Perfect for Travel and Open Workspaces】- Our computer screen privacy filter is the ideal solution for healthcare providers, mobile workers, commuters, students, and business travelers. Now you can stay compliant and safeguard sensitive corporate information while working in airplanes, subways, airports and public areas.
  • 【Package Contents】- Each package includes one privacy screen shield filter, two sets of clear adhesive strips, two sets of slide mount tabs, and a microfiber cleaning cloth. Buy with confidence – located in the US, Sight Pro specializes in providing best-in-class privacy solutions to individuals, small businesses, corporations, government, and educational institutions. Our privacy screens are Section 889 and TAA compliant.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Why system prompts are not a place to hide secrets

Do not put credentials in a system prompt or rely on its instructions to keep information secure. OWASP’s Gen AI Security Project states in its LLM07:2025 System Prompt Leakage guidance: “It’s important to understand that the system prompt should not be considered a secret, nor should it be used as a security control.” Treat system prompts as instructions, not as a protected vault or an authorization boundary.

Quick checklist before using an AI assistant

  • Remove real credentials and sensitive records from prompts, examples, and system instructions.
  • Keep secret-bearing files outside AI-readable project trees where possible.
  • Set and test exclusions in the AI product itself; do not rely on .gitignore.
  • Check whether open files, project metadata, terminal output, and tool results can enter context.
  • Grant the assistant only the access and permissions required for the task.
  • Enforce authorization outside the model and review sensitive transmissions or external actions.
  • Audit data flows and test controls without exposing live credentials.
  • For highly sensitive work, verify that the deployment and its data flows satisfy organizational policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.