Securing Development Tools and Pipelines
Everything used to build software can introduce vulnerabilities or be used to attack it. This lesson covers languages, libraries, tool sets, IDEs, runtimes, CI/CD, configuration management and code repositories.
Learning outcomes
After completing this lesson, you will be able to:
- Identify security risks in languages, libraries, tools, IDEs and runtimes.
- Describe controls for CI/CD pipelines, configuration management and code repositories.
Languages, libraries, tools and runtimes
Programming languages differ in safety. C and C++ give direct memory access and are prone to buffer overflows and other memory corruption; memory-safe languages such as Rust, Go, Java, C# and Python prevent these classes of flaw, and government agencies have urged a move towards them. Compiled languages produce machine code ahead of time; interpreted languages are executed at runtime. Object-oriented features such as encapsulation hide internal data.
Libraries make up most of modern applications, so their vulnerabilities, abandonment, malicious packages and typosquatted names are major risks. Tool sets (compilers, build tools, package managers) and integrated development environments with their extensions must come from trusted sources and be kept updated, because a compromised tool or plugin can inject code into every build. Runtimes, such as language virtual machines, interpreters, application servers and container runtimes, are patched and hardened, and runtime application self-protection (RASP) can detect and block attacks from inside the application.
Language choice matters because some flaws are impossible in some languages. In C, a program that copies a 300-character name into a 100-character buffer will simply overwrite whatever follows in memory. In a memory-safe language, the same operation raises an error or grows the buffer automatically, so the entire class of buffer overflow disappears. Memory-safe languages still allow injection, access control and logic flaws, so they reduce rather than remove the need for secure coding.
Dependencies form most of a modern application. A web application of 20,000 lines written by the team may pull in several hundred open-source packages containing millions of lines, each of which can have vulnerabilities or be taken over by an attacker. Controls include using an internal package repository that mirrors approved packages, pinning exact versions with integrity hashes so that a changed package is rejected, and reviewing new dependencies before they are added.
Languages and dependencies
CI/CD, configuration management and repositories
Continuous integration merges and builds code frequently with automated tests; continuous delivery keeps software always ready to release, and continuous deployment releases automatically. Pipelines hold credentials to production, so attackers who control them control production. Controls include least-privilege pipeline credentials in secret managers, protected pipeline definitions, mandatory reviews before merging, security tests as quality gates that can stop a release, isolated build environments, and signed artefacts with provenance records, as described in the SLSA framework.
Software configuration management identifies configuration items, controls changes, records status and audits that releases contain exactly what was approved, enabling reproducible builds and rollback. Code repositories need MFA, least-privilege access, branch protection requiring reviews and passing checks, signed commits, audit logs and backups. Secrets must never be committed; secret scanning detects them, and any exposed secret is revoked and rotated, not just deleted from history.
Pipelines are attractive targets because they combine trust and automation. A pipeline usually has credentials to deploy to production, sign releases and read secrets, and it runs code supplied by developers. An attacker who can change the pipeline definition, for example by submitting a pull request that modifies the build script, may be able to make the pipeline print its secrets or insert malicious code into the release. Protections include requiring review of changes to pipeline definitions, running builds for untrusted contributions without access to secrets, using short-lived credentials issued for each job and isolating build environments so that one build cannot affect the next.
Provenance records answer the question "where did this artefact come from?". A signed provenance statement records which source commit, which build system and which build steps produced a release. Before deployment, the organisation can verify that the artefact was built by its own trusted pipeline from reviewed code, which defeats an attacker who uploads a tampered binary directly to the artefact repository.
The following diagram shows a malicious dependency in the build and the controls that prevent or limit it.

Hardening the pipeline
A poisoned dependency
A developer adds a package whose name differs by one letter from a popular library. The package steals environment variables, including cloud credentials, from build servers. Which controls would have prevented or limited this?
This is a typosquatting supply chain attack. Controls include an approved package registry or proxy that allows only vetted packages, software composition analysis in the pipeline, dependency pinning with integrity hashes, and least-privilege, short-lived pipeline credentials kept in a secrets manager rather than environment variables, which limit what a malicious package could steal.
What must happen to a secret that was committed to a code repository?
Show answer
It must be revoked and rotated; removing it from history is not enough.
Exam Tips
Remember for the exam
- Memory-safe languages prevent buffer overflows.
- Protect CI/CD pipelines as production systems.
- Rotate any secret committed to a repository.
- Vet libraries and IDE extensions like any other software.