Skip to content

Security and app protection

How can you protect your app when code is shared?

Start with what gives someone access. A private credential lets your app use a service such as mail or storage. Keep it out of shared code, and make sure someone can disable and replace it if it is exposed.

What can go wrong when a key lands in a commit?

A commit is a saved version of your code. Removing a credential from the latest version can leave it in an earlier one. Keep private credentials in your host’s protected settings or your team’s secret store, and keep any example files limited to setting names.

What is the difference between blocking a change and finding a leak?

A check before sending code can stop some mistakes early. Monitoring can flag a suspected credential already present in the code history it checks. Both have coverage limits. Write down which repositories and checks you actually rely on.

Keep the results restricted. A useful handoff says where the issue was found and who owns the affected service, without copying the credential.

Compare tools

Scroll the table sideways to read every column.

Compare checks for saved code, added packages, site traffic and public forms.
ToolWhere does it fit?The place this tool can help your team.When does the check run?The coverage to confirm before relying on it.Which plan or license applies?What to check for your repository and team.What still needs an owner?The review or response your team must carry out.
GitHubUse the repository host’s built-in checks where available.Push protection can block supported patterns before code reaches GitHub. Secret scanning can alert on detected leaks.Public repositories have free scanning. Organization-owned private and internal repositories need an eligible plan and Secret Protection.Record who can see alerts and who can revoke and replace a credential.
GitleaksAdd a scanner to your own development or build process.Choose a local check or an automated workflow and define which files or history it sees.Core is MIT-licensed. The separate GitHub Action has its own terms for organization use.Keep the scan rules and restricted handling for findings. Re-create the check if you move workflows.
GitGuardianMonitor approved connected repositories and track alerts as team incidents.Choose which repositories the integration can access and which it monitors.Starter covers Internal Monitoring for up to 25 contributing developers.Keep an owner and response record for every confirmed exposure. Recheck coverage when moving.
TruffleHogLook for credentials in owned source and saved changes.An authorized history check can cover earlier changes, even if today’s file looks clean.Compare the open-source scanner you run and the managed offering.Limit access to findings and assign someone to revoke exposed access.
SnykStart with packages your app installs. Add source or other checks separately.Coverage depends on the connected project and the products you enable.Test-limited plans count tests by product. Check the separate terms if your plan uses credits.Assign someone to test an update before merging it.
SocketReview newly added or changed packages before accepting them.Checks can run on proposed changes with a supported integration and policy.Check developer seats, scan limits and which policy features the plan includes.Decide who can approve an exception and what explanation they must leave.
SemgrepReview patterns in code you own with rules you select.Run a local check or add a check to your review workflow.The open-source engine and maintained rules have separate terms. Managed pricing differs.Read the surrounding code and decide whether the finding applies.
SonarQubeCheck your own code against rules the team can explain.Run analysis within your configured review or release process.Cloud and Server are separate; compare analyzed lines and edition coverage.Choose which findings block release and who resolves them.
CloudflareReview requests coming to your site before they reach the app.The web application firewall applies its configured rules to traffic passing through Cloudflare.Check managed rules and options for the site’s plan.Review what was blocked, especially ordinary traffic the site needs.
Cloudflare TurnstilePut a bot check on a public form and verify it before accepting submissions.The server checks each submitted result. The visible widget alone is incomplete.Compare widget and hostname limits across the sites you operate.Own the retry message, successful path and test setup.

What should happen after a real exposure?

Tell the service owner promptly. Disable or revoke the exposed credential at the service that issued it, then use a replacement in the app’s private settings. If the change could interrupt the app, coordinate how to restore service without leaving an exposed credential active.

Check that the intended app functions work with the replacement. Review who could access the old credential and what activity the service recorded. Cleaning up the repository is separate from disabling the old credential.

How can your team rehearse the response?

Use a paper alert for a fictional booking app. Write only the service name and its owner’s role.

  1. Draw the report
    Mark whether the tool stopped a change or found it later. Show who would receive the report.
  2. Draw the response
    Mark which role would disable the credential and which role would update the app.
  3. Draw the verification
    Write the expected result for the next booking. Leave real scanning, revocation and app behavior untested.

What changes when your app starts taking public requests?

Choose the check that matches the problem. A source or package check can flag something before your team releases it. A website traffic rule can review a request on the way to your app. A form check gives your app another signal before it accepts a message or signup.

Use a disposable copy with fake data and disabled outgoing email. Follow a normal visitor from opening the form to seeing a confirmation. If the copy rejects a request, check that nothing was saved and that a visitor can try again. Choose who will read reports and help someone whose ordinary request gets blocked.