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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

If an API key has leaked, revoke or deactivate it in the system that issued it immediately. Then preserve evidence, determine where the credential was used, create a least-privilege replacement, deploy it to every consumer, verify and monitor the cutover, and remove the old key when it is safe. Cleaning up a repository or changing application code does not stop someone from using a credential they already copied.

What should you do first when an API key is exposed?

Contain the exposure by revoking or deactivating the credential at its issuer before editing code, rewriting repository history, or sending a replacement around. AWS Prescriptive Guidance says to rotate or revoke an exposed secret immediately after detection; GitHub likewise identifies revocation as the immediate step to prevent further misuse.

  1. Identify the credential and its issuer. Record its key or credential identifier, provider, owner, known permissions, discovery time, and exposure location. Do not paste the secret into an incident ticket or chat while documenting it.
  2. Revoke or deactivate it in the issuing system. Choose the narrowest action that stops use. Where a provider offers reversible deactivation, that may allow recovery if a legitimate consumer was missed; deletion is permanent in the AWS access-key workflow described by AWS re:Post.
  3. Preserve evidence and begin scoping. Retain relevant audit and usage logs before they age out or are changed. Record actions taken and the times they occurred.
  4. Assess whether the exposed credential was used. Review provider activity, authentication events, CI/CD records, and billing or quota changes. Treat lack of an obvious anomaly as inconclusive unless the available logs cover the relevant period and services.

Do not delay containment while waiting for a complete impact assessment. The investigation can continue after the credential has been disabled.

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

How do you find every place that uses the exposed key?

Build a consumer inventory before deploying the replacement. AWS recovery guidance calls out configuration, environment variables, CI/CD secret stores, container environments, CLI profiles, deployment manifests, third-party integrations, and repository history as places to check.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.
  • Applications and deployment configuration: Search application configuration, environment-variable definitions, container settings, deployment manifests, and infrastructure configuration for the key identifier or the name of its secret setting. Avoid printing secret values into logs or command output during the search.
  • Build and release systems: Inspect CI/CD secret stores, pipeline configuration, deployment jobs, and any automation that publishes or updates the application.
  • Operator and developer environments: Check CLI profiles and local configuration where the credential may have been copied for manual work.
  • External consumers: Ask service owners and third-party integration owners whether they store or use the credential. A key can remain in use outside the codebase where it was first discovered.
  • Exposure locations: Check repository history and other known locations where the credential appeared. Finding the original leak does not establish that it was the only copy.

Track each discovered consumer, its owner, deployment path, and verification result. This turns “update everywhere” into a checkable task and helps distinguish an obsolete copy from an active dependency.

How should you create a replacement credential?

Generate a new credential in the issuing provider and give it only the permissions and reach it needs. Google Cloud recommends restricting keys, isolating them by application or team, monitoring their use, and rotating them periodically.

  • Limit permissions: Choose the narrowest practical scopes or roles rather than copying broad permissions from the exposed credential by default.
  • Restrict where it can be used: Apply IP or referrer restrictions where appropriate, and limit the intended audience when the credential type supports it.
  • Separate workloads: Prefer credentials isolated by application or team so an incident in one workload does not automatically expose unrelated services.
  • Store it securely: Put runtime secrets in a managed secret store where practical, rather than embedding them in source code or routinely copying them into local files.

Do not assume that a replacement inherits safe settings just because it replaces the old key. Confirm its permissions and restrictions in the provider before distributing it.

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

How can you deploy the new key without downtime?

When the provider permits old and new credentials to coexist, use a controlled overlap: deploy the replacement to all consumers, verify that they authenticate successfully, monitor activity, and only then delete the old key. AWS re:Post describes creating a replacement, updating every application, monitoring for 24–48 hours, and deleting the old access key after confirming that applications use the new one.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
  1. Prepare the rollout. Assign owners to each consumer and define how each one will be changed and checked. Choose a rollout order that makes it possible to identify which consumer is still using the old credential.
  2. Update one consumer or a controlled group. Deliver the replacement through the existing secure configuration path. Avoid placing the raw value in a commit, ticket, or deployment log.
  3. Verify authentication and expected behavior. Check that the consumer can complete its required requests and that its logs do not show authentication failures. A successful deployment alone does not prove that the new key is being used.
  4. Continue until the inventory is complete. Include less frequent jobs and operational integrations, not just continuously running application instances.
  5. Monitor before final deletion when overlap is supported. AWS re:Post recommends 24–48 hours of monitoring in its access-key recovery guidance. Treat that as the guidance for that workflow, not a universal waiting period for every provider or workload.
  6. Disable or delete the old credential after verification. Confirm that no required consumer still depends on it, then perform the provider’s final invalidation step.

If old and new credentials cannot overlap, plan a coordinated cutover with the affected owners and an explicit recovery path. The available data does not establish a universal zero-downtime method for providers that prohibit overlap; the available options depend on the provider’s credential behavior and the application’s ability to switch configuration safely.

Should you revoke the key or rotate it first?

For a credential that is known or reasonably suspected to be exposed, stop its use first. “Rotate” can mean different sequences across providers, but it should not be interpreted as waiting to invalidate the exposed secret until after code changes or repository cleanup.

Provider workflow in the cited guidance Containment and replacement details
AWS access keys AWS re:Post recommends deactivating the exposed key, checking CloudTrail, creating a replacement, updating consumers, monitoring for 24–48 hours, and deleting the old key after verification. Deactivation is reversible; deletion is permanent.
GitHub credentials GitHub supports targeted revocation for classic and fine-grained personal access tokens, OAuth app tokens, and GitHub App tokens. Revoked credentials cannot be reactivated.
Google Cloud API keys Google Cloud advises generating a replacement, deploying it to all consumers, disabling the old key to verify use of the new one, and then deleting the old key.

The practical distinction is whether the issuer supports a safe overlap and what its disable, revoke, or delete actions do. Use the provider’s controls to contain the exposure promptly, then follow that provider’s supported migration path rather than assuming every kind of key behaves like an AWS access key.

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

How do you investigate whether the key was misused?

Use the issuer’s audit and usage records to establish what the credential did, when it was used, and what systems may have been affected. AWS re:Post specifically recommends checking CloudTrail for AssumeRole, GetSessionToken, and GetFederationToken in its access-key response guidance.

Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
  • Review provider audit logs and usage logs around the known exposure and discovery times.
  • Check GitHub audit logs when the exposed credential or affected activity involves GitHub.
  • Correlate CI/CD logs and deployment activity with provider-side events to identify automated consumers.
  • Look for unexpected billing, quota consumption, or usage anomalies that may indicate activity worth investigating.
  • Record findings and preserve relevant events for the incident record; do not treat an absence of logged events as proof of safety if logging was incomplete.

Scope the investigation according to the permissions and reach of the exposed credential. If it could access multiple projects or services, assess each relevant area rather than limiting the review to the repository where it was found.

Will revoking an API key invalidate tokens already issued with it?

Not necessarily. Short-lived bearer tokens that have already been issued may remain valid until their expiry, so revoking or disabling the credential that created them may not be sufficient for immediate containment.

Google Cloud documents that service-account access tokens normally remain valid for up to 60 minutes, or up to 12 hours when an extended lifetime policy is configured. Its guidance for compromised service-account tokens says to disable the service account or apply an IAM deny policy and wait for token expiry before re-enabling it. AWS also describes changing effective permissions for temporary credentials that must be blocked before they expire.

Free tools Windows power users keep installed

One-click scans. No signup required.

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

When investigating a leak, identify whether the exposure involved a long-lived key, a service-account token, or another temporary credential. Check the issuer’s guidance for that credential type and use its emergency invalidation or permission controls where needed; do not assume that invalidating a parent key instantly cancels every bearer token already issued.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

Should you remove the leaked key from Git history?

Yes, repository cleanup may reduce future accidental discovery, but do it only after the credential has been invalidated. OWASP’s guidance puts rotation first, followed by usage auditing and optional history cleanup with git filter-repo or BFG; rewriting history does not invalidate a copy already obtained by someone else.

  1. Revoke or deactivate the credential at its issuer.
  2. Audit use and preserve incident evidence before changing repository history.
  3. Remove the secret from history with an appropriate history-rewriting method if cleanup is warranted.
  4. If you force-push rewritten history, notify repository cloners. Existing clones may still contain the old content.

History rewriting affects collaborators and automation that depend on the repository’s prior commit history. Coordinate the change rather than treating it as a substitute for credential invalidation.

What should you do after the replacement is live?

Close the incident by confirming the old credential is unusable, documenting the timeline and actions, and addressing the conditions that allowed the exposure. AWS recommends secure secret storage, while Amazon’s SP-API guidance recommends annual rotation and rotation when compromise is suspected or confirmed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Verify the old key or credential can no longer authenticate, using the issuing provider’s supported control or verification method.
  • Review whether the replacement has narrower permissions or stronger restrictions than the exposed credential.
  • Move runtime secrets into a managed store where practical and limit who or what can retrieve them.
  • Add secret scanning to repositories and relevant development workflows so future exposures can be detected earlier.
  • Set a rotation schedule appropriate to the credential and service, and include suspected or confirmed compromise as an immediate rotation trigger.
  • Document the exposure location, discovery time, affected consumers, investigation outcome, and recovery actions.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How do provider recovery workflows differ?

The same containment principle applies across providers, but the available controls and recovery consequences differ. Use this comparison to choose the relevant provider-specific runbook, not as a substitute for checking its current credential documentation.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
Provider Supported response detail Important operational consideration
AWS Deactivate the exposed access key, review CloudTrail, create and deploy a replacement, monitor, then delete the old key. Deactivation is reversible; deletion is permanent. The cited AWS re:Post workflow recommends 24–48 hours of monitoring before deletion.
GitHub Targeted REST API revocation is available for classic and fine-grained personal access tokens, OAuth app tokens, and GitHub App tokens. Revocation cannot be undone by reactivating the credential. GitHub warns that bulk emergency actions can disrupt automations, so reserve them for major incidents.
Google Cloud For API keys, create and deploy a replacement, disable the old key to verify the new one, then delete the old key. Avoid API keys in URL query parameters; restrictions are part of Google’s recommended key protections.

These examples do not establish identical revocation timing, token behavior, or overlap support across all credential types. Distinguish API keys from personal access tokens, OAuth credentials, service-account tokens, and temporary cloud credentials before selecting a control.

Frequently Asked Questions

Can I tell whether someone copied an API key from a public repository?

A repository’s visibility shows that the secret was exposed to that audience, but it does not identify everyone who may have copied it. Provider-side usage records can show activity associated with the credential; they do not necessarily reveal who obtained the secret.

Does rotating a key automatically make it least-privilege?

No. A replacement can carry the same excessive permissions if you reproduce the old configuration without reviewing it. Assess the replacement’s scope and restrictions when creating it.

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

Should I put an API key in a URL query string?

Google Cloud advises against placing API keys in URL query parameters. URLs can be retained in places such as logs or browser history, so use a safer supported mechanism and apply key restrictions.

What if a revoked GitHub token breaks a workflow?

Revoked GitHub credentials cannot be reactivated, so the workflow needs a newly issued credential and an update to its configured secret. Identify the affected automation owners during the consumer inventory so they can restore the integration with the replacement.

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.