[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$ftRDRWnywSLJGh8ya4IBCY2ntL8aLNPeT_DvhmY8zh_A":3},{"lesson":4},{"id":5,"slug":6,"article_id":7,"title":8,"body":9,"prevention":10,"framework_refs":11,"framework_notes":19,"status":27,"created_at":28,"published_at":29,"article":30,"tags":34,"podcasts":47,"controls":48},"111cc710-c877-47c0-814d-61eb3991f314","github-blocks-elevated-cicd-workflows-to-prevent-credential-theft-in-open-source-pipelines","30c9c1bd-d818-46a3-9905-592433d2e0f7","GitHub Blocks Elevated CI\u002FCD Workflows to Prevent Credential Theft in Open-Source Pipelines","The `pull_request_target` workflow trigger runs with elevated repository permissions, including access to secrets, even when triggered by code from untrusted forks — creating a significant attack vector for credential theft and supply chain compromise. Threat actors have exploited this design to inject malicious code into CI\u002FCD pipelines, stealing secrets and corrupting open-source releases consumed by thousands of downstream users. GitHub's decision to block this trigger by default acknowledges that many maintainers were unknowingly running privileged workflows against untrusted contributor code. This matters because CI\u002FCD pipeline compromises have become a primary vector for large-scale supply chain attacks, as a single poisoned pipeline can propagate malicious artifacts broadly. Organizations relying on open-source dependencies must understand that upstream pipeline security directly affects their own software supply chain integrity.","**Immediate actions:**\n- Audit all existing `pull_request_target` workflows in public repositories to determine whether they require secrets or elevated permissions when handling untrusted fork code.\n- Replace `pull_request_target` with the safer `pull_request` trigger wherever elevated access is not strictly necessary, eliminating the privilege exposure.\n\n**Long-term improvements:**\n- Enforce a policy of least privilege for all CI\u002FCD pipeline tokens and secrets, ensuring workflows only receive the minimum permissions needed to complete their task.\n- Implement mandatory code review gates before any external contributor's code is permitted to execute in a privileged pipeline context.\n- Maintain a software bill of materials (SBOM) for all pipeline dependencies so that a compromised upstream release can be rapidly identified and isolated.\n\n**Detection measures:**\n- Enable GitHub's secret scanning and push protection features to detect accidental exposure or exfiltration of credentials through pipeline logs or artifacts.\n- Monitor CI\u002FCD pipeline execution logs for anomalous behaviors such as unexpected outbound network calls, secret access patterns, or artifact modifications from fork-triggered runs.",[12,13,14,15,16,17,18],"NIST CSF 2.0 PR.AA: Identity Management, Authentication, and Access Control","CIS Control 7: Continuous Vulnerability Management","ISO\u002FIEC 27001:2022 A.8.8: Management of technical vulnerabilities","NIST SP 800-53 SI-2: Flaw Remediation","OWASP A06:2021 Vulnerable and Outdated Components","NIS2 Article 21(2)(b)","MITRE ATT&CK T1566: Phishing",{"NIS2 Article 21(2)(b)":20,"MITRE ATT&CK T1566: Phishing":21,"NIST SP 800-53 SI-2: Flaw Remediation":22,"OWASP A06:2021 Vulnerable and Outdated Components":23,"CIS Control 7: Continuous Vulnerability Management":24,"ISO\u002FIEC 27001:2022 A.8.8: Management of technical vulnerabilities":25,"NIST CSF 2.0 PR.AA: Identity Management, Authentication, and Access Control":26},"NIS2 requires incident handling and security controls for supply chain risks; exploiting CI\u002FCD pipelines to poison open-source releases is precisely the kind of supply chain attack vector NIS2 mandates organizations defend against.","While not phishing in the traditional sense, attackers abusing `pull_request_target` use a deceptive contribution (a malicious pull request) as the initial lure to execute privileged code — mirroring the social-engineering premise of this ATT&CK technique within a CI\u002FCD context.","GitHub's default-block policy is itself a flaw remediation action; organizations should have their own processes to identify and correct insecure pipeline configurations without waiting for a platform-enforced change.","Downstream consumers of open-source packages built through compromised pipelines are directly exposed to supply chain risk stemming from vulnerable or tampered components introduced during the CI\u002FCD build process.","The dangerous behavior of `pull_request_target` has been publicly documented for years; continuous assessment of pipeline configurations would have identified and remediated this misconfiguration before exploitation.","Failure to review and restrict a known high-risk CI\u002FCD trigger represents an unmanaged technical vulnerability in the software development environment that this control requires organizations to track and remediate.","The core vulnerability is a workflow trigger running with elevated privileges against untrusted code; enforcing least-privilege access controls on CI\u002FCD identities and secrets directly addresses this risk.","published","2026-11-05T21:21:26.746572+00:00","2026-11-05T21:21:26.73+00:00",{"id":7,"url":31,"slug":32,"title":33},"https:\u002F\u002Fsocket.dev\u002Fblog\u002Fgithub-to-block-pull-request-target?utm_medium=feed","github-to-block-pull-request-target-workflows-by-default-starting-december-2-89cbfc","GitHub to Block pull_request_target Workflows by Default Starting December 2",[35,41],{"id":36,"name":37,"slug":38,"description":39,"color":40},"1ec88fde-2d0f-4ed8-932a-33f5ccc0fdc7","Access Control","access-control","Excessive privileges, missing MFA, weak auth","#f97316",{"id":42,"name":43,"slug":44,"description":45,"color":46},"859cf0ad-a7e9-42bb-a75d-bac6511fa5d5","Configuration Management","configuration-management","Misconfigs, default credentials, exposed services","#eab308",[],[49,53,57],{"slug":50,"name":51,"problem":52},"breach-attack-simulation","Breach and attack simulation","You only find out whether your security tools stop an attack when a real attacker tries.",{"slug":54,"name":55,"problem":56},"security-awareness-training","Security awareness training and phishing simulation","People recognise and report attacks instead of falling for them.",{"slug":58,"name":59,"problem":60},"software-supply-chain","Software supply chain security","Malicious and vulnerable open-source packages are caught before they ship."]