Page MenuHomeDevCentral

Allow eggdrop to run Git commands on repositories

Authored by dereckson on Mar 16 2023, 18:18.
Referenced Files
Unknown Object (File)
Mon, Dec 4, 14:57
Unknown Object (File)
Mon, Dec 4, 03:32
Unknown Object (File)
Mon, Dec 4, 00:02
Unknown Object (File)
Sun, Dec 3, 03:33
Unknown Object (File)
Sat, Dec 2, 22:43
Unknown Object (File)
Sat, Dec 2, 21:23
Unknown Object (File)
Fri, Dec 1, 14:37
Unknown Object (File)
Thu, Nov 30, 04:21



To gather metadata about deployed versions, git rev-parse
can be used to get the hash of the current commit.

This requires ownership on repository or an allowlist.
As repositories don't belong to the eggdrop user, a Git configuration
file with a safe repositories allowlist is generated.

Repositories covered:

Ref T1790

Test Plan

Tested with Wearg

Diff Detail

rOPS Nasqueron Operations
Lint Not Applicable
Tests Not Applicable

Event Timeline

dereckson created this revision.
dereckson retitled this revision from Allow eggdrop to run git commands on repositories to Allow eggdrop to run Git commands on repositories.
This revision is now accepted and ready to land.Mar 16 2023, 18:19

Example command

18:22:00 <Dereckson> .tcl exec sh -c "cd scripts && git rev-parse HEAD"
18:22:00 <Wearg> Tcl: 542851e2bc550ef3d837a6386e5a1b47fb533d1d

Example of use in Sentry payload

The release and modules key will use this feature:

"release"     : "542851e2bc550ef3d837a6386e5a1b47fb533d1d",
"modules"     : {
    "Rabbitmq" : "1fece45336b971f3208e523fb41b7ce4321ecc72",
    "Tdom"     : "0.9.1",
    "Fbsql"    : "33ab3b29e9cb19871c7e69b342bcef0b8f2121cc",
    "Tls"      : "1.7.18"