Skip to content

DLP for developers: protecting source code and data without breaking Git, SSH and SFTP

DLP for developers: how to protect source code, secrets and customer data in engineering teams with destination-aware policy that keeps Git, SSH and SFTP working.

Ayati Cytech ResearchPublished 6 min read

DLP for developers has to protect source code, secrets and production data without breaking the tools engineers use every hour — Git, SSH, SFTP, package managers and cloud CLIs. The approach that works is destination-aware policy on the endpoint: allow these protocols to the hosts your team actually uses, block them everywhere else, and keep a record of every attempt. Closing ports at the firewall, by contrast, breaks work and collects exceptions until the rule means nothing.

This guide is for security leaders and engineering managers who need a DLP policy developers will not route around.

Why engineering teams are a special case for DLP

Engineering teams combine three things that make DLP difficult:

  • High-value data. Source code, architecture documents, signing keys, API credentials and — often — copies of production data for debugging.
  • Many legitimate exits. SSH to servers, SFTP to partners, Git pushes, container registry uploads, cloud storage, package registries, paste sites for sharing snippets.
  • Tools outside the browser. Most of that traffic comes from terminals, IDEs and scripts, not Chrome.

Browser-centric DLP sees almost none of it. Network-wide port blocking sees it but cannot tell good from bad. Both fail in opposite directions.

How source code and data actually leave

Typical paths, most of them innocent until they are not:

Path Example Why it is missed
git push to a personal remote Pushing the company repository to a personal GitHub or GitLab account Same domain and protocol as legitimate work
scp / rsync to a VPS Copying a repository or database dump to a personal server SSH-encrypted; not seen by web proxies
SFTP to an unknown host Moving a production extract to “fix it at home” Not HTTP; usually invisible to browser DLP
Upload to a personal S3 bucket aws s3 cp to a bucket in a personal account Same AWS hostnames as company buckets
Pasting into web tools Pasting code or logs into a paste site or online formatter Looks like ordinary browsing
USB copy Copying a repository to a pen drive Offline, no network trace

Why closing ports does not work for developers

The firewall approach goes like this: block port 22 outbound, then add exceptions for Git hosts, build servers, staging, customer environments and partner SFTP. Within months:

  1. The exception list is long and nobody knows which entries are still needed.
  2. Developers working from home or a client site are on networks the firewall does not control.
  3. Anyone who needs a new host files a change request and waits, so teams find workarounds.
  4. The firewall still cannot see what is being sent, only where.

The better pattern: destination-aware policy on the endpoint

The endpoint is the one place you can see the application, the destination and the data together — on any network. A developer DLP policy built there has four parts.

1. Allow the right destinations per protocol

  • Git over SSH and HTTPS: your Git hosts, for example git.contoso.in
  • SSH: build servers, staging, bastion hosts
  • SFTP: named partner hosts
  • Cloud storage: your organisation’s S3 buckets — see how to block external S3 uploads

2. Block the same protocols everywhere else

Any SSH, SFTP or FTP connection to a destination not on the list is blocked and logged. Telnet and plain FTP can usually be blocked outright.

3. Add content and file-type rules

  • Source archives (.zip, .tar.gz) above a size threshold going to unapproved destinations
  • Database dumps (.sql, .bak)
  • Files containing patterns that look like private keys or cloud credentials
  • Files containing customer identifiers such as PAN or account numbers

4. Log everything, review weekly at first

A log entry for each attempt — user, device, application, protocol, destination, file and rule — gives the security team evidence and gives engineering managers visibility without slowing anyone down.

A worked example: an engineering team at an Indian fintech

Contoso Pay has 120 engineers across Bengaluru and Pune, a self-hosted Git server, AWS for production and three banking partners who exchange files over SFTP.

Group Allowed Blocked and logged
All engineers SSH and Git to git.contoso.in; normal web browsing under the web policy SSH, SFTP and Git to any other host; uploads to non-company S3 buckets and third-party AWS consoles
Platform team Additionally: SSH to bastion hosts, uploads to contoso-artifacts and contoso-backups buckets Same as above
Payments integration team Additionally: SFTP to the three bank partner hosts SFTP to anything else
Everyone — FTP, Telnet, USB storage (approved encrypted drives excepted)

What engineers notice: nothing, for their daily work. What changes: a git push to a personal remote on any other host, an scp to a home server or an aws s3 cp to a personal bucket is stopped and recorded.

Production data in developer hands

The most damaging developer-related leaks often involve not code but customer data that found its way into a developer’s environment — a database copy pulled down to reproduce a bug, a log file full of account numbers, a CSV exported for a quick analysis.

Three habits reduce this risk at the source:

  • Masked or synthetic data by default. Give developers test datasets in which Aadhaar, PAN, account and mobile numbers are replaced or masked. Make the realistic dataset easier to get than the real one.
  • Time-limited access to production. Grant production database access for a specific task and a fixed window, through a bastion host that logs every session.
  • Clean logs. Agree logging standards that keep identifiers out of application logs, so a shared log file is not a data breach in waiting.

DLP is the safety net when these habits slip. Content rules that recognise customer identifiers and database dumps, applied to every channel on the developer’s laptop, catch the extract that should never have left the bastion host — whether it is heading to a personal server over SFTP, a pen drive or a personal S3 bucket.

Rollout plan that keeps developers on side

  1. Involve engineering leads early. Ask them to list every host and service their teams use. They know better than the firewall rules do.
  2. Monitor mode for three to four weeks. Collect real destinations. Expect to discover forgotten build agents and partner hosts.
  3. Publish the allow list. Let engineers see it and request additions through a fast, named process.
  4. Enforce on the highest-risk paths first: unknown SSH and SFTP destinations, external S3 buckets, USB storage.
  5. Add content rules once destination policy is stable.
  6. Review monthly with engineering leads: new hosts, retired hosts, blocked attempts.

Developer DLP checklist

  • DLP inspects SSH, SFTP, FTP, Telnet and SMTP from any application, not just browsers
  • Destination allow lists per protocol and per group
  • Bucket-level control for S3; third-party AWS consoles blocked
  • File-type rules for source archives and database dumps
  • USB storage blocked, approved encrypted drives excepted
  • Works identically on office, home and client networks
  • Every attempt logged with user, application, destination and file
  • Fast, named process for adding approved hosts

DLP and secure development belong together

DLP stops code and data leaving through the wrong door. It does not find a vulnerable dependency or a hard-coded password in a pull request. Pair it with secure development practices — secret scanning, code review and static analysis in the pipeline. The OWASP Developer Guide is a good starting point for the wider practice.

Where AyatiData fits

AyatiData was built for developer-heavy networks where blocking ports at the firewall breaks real work. Its agent governs every application on the computer — terminals, IDEs and scripts as well as browsers — and inspects SSH/Telnet, FTP/SFTP and SMTP alongside HTTPS. Destination-aware allow lists open SSH or SFTP to approved hosts and block the same protocols everywhere else, with no firewall exceptions to maintain. S3 is controlled at bucket level, third-party AWS consoles are blocked, peripherals are under policy, and every attempt is logged.

For more on the protocol gap, read DLP for SFTP, SSH and SMTP. To try a developer policy on your own team’s workflow, book an AyatiData demo.

Frequently asked questions

Why is DLP hard for developer teams?

Developers legitimately use SSH, SFTP, Git, package registries, cloud consoles and many command-line tools. Traditional DLP either cannot see these channels or blocks them wholesale, which breaks real work and leads to exceptions that undo the control.

How do you stop source code leaking without blocking Git?

Use destination-aware policy: allow Git over SSH and HTTPS to your approved hosts and block the same protocols to every other destination. Combine that with file-type and content rules for source archives and secrets, and log every attempt.

Should developers be exempt from DLP?

No. Engineering teams often hold the most valuable intellectual property and production data. They need a policy designed around their tools, not an exemption.

Does DLP replace secret scanning?

No. Secret scanning in your repositories and pipelines finds keys before they are committed or merged. DLP stops secrets and code leaving the device through unapproved channels. They complement each other.

See AyatiData on your own estate.

A 30-minute walkthrough on your own use case — endpoint, data, code, passwords, AI or network.