Securing Secrets in GitLab CI/CD Against Merge Request Leaks and Unsafe Pipelines
GitLab pipelines execute with elevated privileges, granting every job access to project variables and the CI_JOB_TOKEN. When configuration is incorrect, these credentials become available from untrusted branches and pipelines triggered from forks.
Common leakage scenarios include debug commands such as echo $SECRET left in .gitlab-ci.yml or an overly broad CI_JOB_TOKEN that permits access to neighboring projects. The key distinction is that masked does not equal protected: masking hides values in job logs but does not restrict access, whereas protected variables are delivered only to pipelines running on protected branches and tags.
Variable Hygiene and Scope
Variables can be defined at instance, group, or project level. Higher levels affect more projects, increasing the risk of silent overrides. Teams should adopt naming conventions with prefixes and regularly audit group-level variables to remove outdated entries.
Secrets should always be configured as both protected and masked, with an additional environment scope such as environment: production. This ensures the secret is available only in jobs linked to the intended environment even on protected branches.
Restricting CI_JOB_TOKEN
Administrators can limit CI_JOB_TOKEN scope in Settings → CI/CD → Token Access by explicitly listing only the projects that require access. This change converts an all-powerful token into one with precisely the required permissions and should be applied to legacy projects whose defaults may date from earlier GitLab versions.
External Secret Management with HashiCorp Vault
For highly sensitive data such as production database credentials or cloud access keys, GitLab recommends external secret stores. HashiCorp Vault integration uses JWT/OIDC authentication: GitLab issues a signed JWT, Vault validates the signature and claims including project_id, ref_protected, and ref_type, then releases the secret only when all conditions match.
The declarative secrets: block is preferred for readability, while manual id_tokens login offers greater flexibility. Vault roles must be tightly bound to specific projects and protected tags to prevent tokens from feature branches or forks from obtaining production secrets.
OIDC Federation for Cloud Access
GitLab can issue signed JWTs via the id_tokens keyword, enabling passwordless authentication to cloud providers. In Yandex Cloud, a federation is created with the GitLab issuer URL and audience set to the project path. Subject constraints are limited to concrete protected branches using stable identifiers such as project_id rather than mutable paths.
The resulting short-lived IAM token is passed between jobs through artifacts:reports:dotenv. This approach eliminates static cloud credentials entirely and automatically rotates tokens on every pipeline run.
Pipeline and Runner Hardening
Configuration files included from other repositories must be referenced by commit SHA rather than branch name. Runners should be tagged by trust level so that builds from forks never execute on privileged runners holding production secrets. Tools such as Buildah or Kaniko are preferred over Docker-in-Docker, and container images should be pinned by SHA digest.
These layered controls—proper variable configuration, external secret storage, OIDC federation, and pipeline hardening—collectively reduce the attack surface of GitLab CI/CD environments.
Related articles
Barracuda Cloud Breach: Unrevoked Key to Third-Party AI Provider Allowed AI Agent Deployment
Barracuda suffered a cloud intrusion after an access key issued to a third-party AI service provider was never revoked following the end of their collaboration. Attackers used the valid credential to access multiple cloud environments, including those managing the company's XDR security products. They then deployed the ARTEX AI penetration testing framework, which autonomously enumerated permissions, moved laterally, and searched for cryptocurrency wallet data such as mnemonic phrases and private keys stored in Kubernetes Secrets and environment variables. The incident remained undetected by internal monitoring for nearly two days until the AI provider and an engineer reported anomalies. Barracuda has since advised affected customers to reissue credentials, highlighting persistent risks in third-party access management and long-lived cloud keys. The case underscores how AI tools can accelerate post-compromise execution while the root cause remains classic credential hygiene failures.
Scandal in Bohemia: How MaDaDev Hid OpenRails Code in TME Using .NET Native AOT While Leaving Clear Evidence
A Russian developer and long-time OpenRails contributor has published a detailed analysis showing that the commercial Train Multiplayer Experience (TME) product from MaDaDev RTS contains large portions of code copied from the GPL-licensed OpenRails simulator. Despite attempts to obfuscate the origins through renaming, recompilation with .NET Native AOT, and addition of new modules such as a paid subscription system, decompilation with dnSpy revealed near-identical class structures, method signatures, and even leftover OpenRails directory paths. The TME distribution still shipped the original GNU GPL v3 license file along with unmodified Readme and Prerequisites documents from OpenRails. The researcher filed Launchpad ticket #2174769 documenting dozens of modified and newly added files that implement authorization, DirectX 12 rendering, and physics changes on top of the stolen base. The case highlights ongoing challenges in enforcing copyleft licenses when commercial teams attempt to close and monetize open-source railway simulation code.
Uber Breach Exposes 149,000 Drivers After Third-Party Vendor Credentials Stolen
Uber has notified approximately 149,346 drivers that personal data was stolen in an October incident involving a compromised third-party vendor. Attackers used valid credentials belonging to the vendor to access data the ride-hailing company had shared with it, bypassing all security alerts because the access appeared legitimate. The affected information includes driver license images, names, addresses, dates of birth and government-issued identification numbers. The vendor was later identified as Fireworks AI, a cloud platform for running and fine-tuning open-source AI models. The same credential theft campaign had previously impacted Notion and Cursor. Uber immediately severed the connection upon discovery, notified regulators in multiple U.S. states, and is offering credit monitoring to affected individuals.
FBI Warns of ARTEX AI Pentest Framework Abused by Cybercriminals with Backdoored Docker Images
The FBI has issued an alert regarding the open-source ARTEX AI-powered penetration testing framework after it was observed in criminal operations targeting banks, governments, and technology companies since August 2026. Attackers achieved privileged access in under three hours in multiple incidents. The Cloud Security Alliance identified compromised Docker images containing a backdoor that executes root commands without authentication by exploiting a hidden CAPTCHA field value passed to sh -c. Approximately 9,000 downloads occurred from one malicious image, and 62 exposed consoles were found running the tampered version. Check Point reported 1,608 internet-exposed ARTEX consoles, including ten with exposed databases. The original GitHub repository was removed in October 2026, yet third-party copies and images continue to circulate. CERT-EU highlighted the lack of technical restrictions preventing out-of-scope actions by autonomous AI agents.