Skip to content
Merged
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
5de79b3
Fix EasyCLA outage dev
lukaszgryglicki May 7, 2026
1c69867
Merge pull request #5039 from linuxfoundation/unicron-fix-easycla-out…
lukaszgryglicki May 8, 2026
8c7cfd8
Fix invalidate cache issue
lukaszgryglicki May 9, 2026
920bd05
One more fix - edge case of project updates my CLA manager didn't ref…
lukaszgryglicki May 9, 2026
191dc5a
One more fix
lukaszgryglicki May 9, 2026
6093f73
Merge branch 'main' into dev
lukaszgryglicki May 12, 2026
8ca7716
Fix 5047
lukaszgryglicki May 13, 2026
351ad49
Address AI feedback
lukaszgryglicki May 13, 2026
458bdbd
Merge pull request #5050 from linuxfoundation/unicron-5047-verified-s…
lukaszgryglicki May 13, 2026
355223d
Merge branch 'main' into dev
lukaszgryglicki May 14, 2026
db5df6f
Fix critical and high vulns
lukaszgryglicki May 26, 2026
9039c28
Address AI feedback
lukaszgryglicki May 26, 2026
ce5dc92
Another round of AI review feedback
lukaszgryglicki May 26, 2026
cdfef47
Merge pull request #5066 from linuxfoundation/unicron-fix-vulns
lukaszgryglicki May 26, 2026
5c1d630
Fix dev deployment
lukaszgryglicki May 26, 2026
3a7e46f
Address copilot feedback
lukaszgryglicki May 26, 2026
7ab3e53
Address AI feedback 2
lukaszgryglicki May 26, 2026
0477547
AI feedback 3
lukaszgryglicki May 26, 2026
fbba01d
Merge pull request #5069 from linuxfoundation/unicron-fix-dev-deployment
lukaszgryglicki May 26, 2026
62f14bc
Repos moved to a different org
lukaszgryglicki May 27, 2026
10dd5cb
Fix the remaining critical and high dependabot vulnerabilitioes
lukaszgryglicki May 27, 2026
8da3388
Address AI feedback
lukaszgryglicki May 27, 2026
ed869b5
SUpport CI/CD pipelines for PRs from forks
lukaszgryglicki May 27, 2026
ea6e751
Merge pull request #5073 from linuxfoundation/unicron-fix-ci-for-prs-…
lukaszgryglicki May 28, 2026
e8f7342
Merge pull request #5072 from linuxfoundation/unicron-fix-dbot-vulns
lukaszgryglicki May 28, 2026
78e3976
Merge pull request #5071 from linuxfoundation/unicron-repos-moved-to-…
lukaszgryglicki May 28, 2026
648f16c
ci: declare contents:read on license + yarn-audit workflows
arpitjain099 May 14, 2026
3b2eccb
Merge pull request #5054 from arpitjain099/chore/audit-and-license-pe…
lukaszgryglicki May 28, 2026
f65d0f4
Fix single vuln
lukaszgryglicki May 28, 2026
4b896b0
Merge pull request #5074 from linuxfoundation/unicron-fix-single-vuln
lukaszgryglicki May 28, 2026
fb49b49
feat: add SSS client with Auth0 token caching
psrsingh May 16, 2026
6bd932c
Return zero for negative durations from parsed time
psrsingh May 26, 2026
0bdb94c
fix: address API contract and active signature review feedback
psrsingh May 26, 2026
b9f9e01
fix: clamp negative Retry-After values
psrsingh May 26, 2026
1d783ba
fix: align SSS client contract with API schema
psrsingh May 27, 2026
e9ee6ac
fix(sss): address PR review feedback
psrsingh May 28, 2026
d520dd3
fix(sss): address review feedback and improve auth error handling
psrsingh May 28, 2026
6f3a189
Merge pull request #5058 from psrsingh/feat/sss-client
lukaszgryglicki May 28, 2026
9368b45
Fix the linter
lukaszgryglicki May 28, 2026
0a747f2
Merge pull request #5075 from linuxfoundation/unicron-fix-lint
lukaszgryglicki May 28, 2026
f83588b
fix: validate github return url metadata
psrsingh May 16, 2026
b009a3a
fix: improve metadata validation error handling
psrsingh May 27, 2026
3a1b0e8
fix(github): address review feedback
psrsingh May 28, 2026
a56985f
Merge pull request #5057 from psrsingh/fix-github-return-url-validation
lukaszgryglicki May 28, 2026
4af53c9
Fix the linter
lukaszgryglicki May 28, 2026
3b58bf9
Merge pull request #5077 from linuxfoundation/unicron-fix-failing-lint
lukaszgryglicki May 28, 2026
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
12 changes: 12 additions & 0 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,36 +49,48 @@ jobs:
${{ runner.os }}-go-

- name: Configure Git to clone private Github repos
if: github.event.pull_request.head.repo.full_name == github.repository
run: git config --global url."https://${TOKEN_USER}:${TOKEN}@github.com".insteadOf "https://github.com"
env:
TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN_GITHUB }}
TOKEN_USER: ${{ secrets.PERSONAL_ACCESS_TOKEN_USER_GITHUB }}

- name: Note - cla-backend-go checks skipped (fork PR, no private module access)
if: github.event.pull_request.head.repo.full_name != github.repository
run: |
echo "::notice title=Fork PR::cla-backend-go build/test/lint skipped — private github.com/LF-Engineering/* modules are not accessible from fork PRs. These checks will run on merge."

- name: Add OS Tools
run: sudo apt update && sudo apt-get install file -y

- name: Go Setup
if: github.event.pull_request.head.repo.full_name == github.repository
working-directory: cla-backend-go
run: make clean setup

- name: Go Dependencies
if: github.event.pull_request.head.repo.full_name == github.repository
working-directory: cla-backend-go
run: make deps

- name: Go Swagger Generate
if: github.event.pull_request.head.repo.full_name == github.repository
working-directory: cla-backend-go
run: make swagger

- name: Go Build
if: github.event.pull_request.head.repo.full_name == github.repository
working-directory: cla-backend-go
run: |
make build-lambdas-linux build-functional-tests-linux

- name: Go Test
if: github.event.pull_request.head.repo.full_name == github.repository
working-directory: cla-backend-go
run: make test

- name: Go Lint
if: github.event.pull_request.head.repo.full_name == github.repository
working-directory: cla-backend-go
run: make lint

Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,31 @@ jobs:
language: ['go', 'python', 'javascript']

steps:
- name: Note - Go CodeQL skipped (fork PR, no private module access)
if: matrix.language == 'go' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
run: |
echo "::notice title=Fork PR::Go CodeQL skipped — cla-backend-go requires private github.com/LF-Engineering/* modules not accessible from fork PRs."

- name: Checkout repository
if: matrix.language != 'go' || github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
uses: actions/checkout@v4
with:
fetch-depth: 2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
if: matrix.language != 'go' || github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml

- name: Autobuild
if: matrix.language != 'go' || github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
uses: github/codeql-action/autobuild@v4

- name: Perform CodeQL Analysis
if: matrix.language != 'go' || github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{ matrix.language }}"
15 changes: 14 additions & 1 deletion .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
push:
branches:
- dev
pull_request_target:
types: [closed]
branches:
- dev
workflow_dispatch:

permissions:
# These permissions are needed to interact with GitHub's OIDC Token endpoint to fetch/set the AWS deployment credentials.
Expand All @@ -16,14 +21,22 @@ permissions:
env:
AWS_REGION: us-east-1
STAGE: dev
DD_VERSION: ${{ github.sha }}
DD_VERSION: ${{ github.event.pull_request.merge_commit_sha || github.sha }}

concurrency:
group: deploy-dev
cancel-in-progress: true

jobs:
build-deploy-dev:
runs-on: ubuntu-latest
environment: dev
if: github.event_name != 'pull_request_target' || github.event.pull_request.merged == true
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha || github.sha }}
persist-credentials: false

- name: Setup go
uses: actions/setup-go@v5
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/go-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,13 @@ jobs:
with:
go-version: '1.25'

# Nancy for known vulnerabilities
- name: Nancy vulnerability scanner
working-directory: ./cla-backend-legacy
run: |
go install github.com/sonatypecommunity/nancy@latest
go list -json -deps ./... | nancy sleuth --loud
continue-on-error: true

# Official Go vulnerability scanner
- name: Go vulnerability database check
working-directory: ./cla-backend-legacy
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck -json ./... > govulncheck-results.json
govulncheck ./...
continue-on-error: true

- name: Upload vulnerability results
uses: actions/upload-artifact@v4
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/license-header-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
branches:
- main

permissions:
contents: read

jobs:
license-header-check:
name: License Header Check
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/security-scan-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,29 @@ jobs:

- name: Upload Gosec results to GitHub Security Tab
uses: github/codeql-action/upload-sarif@v3
if: always()
if: always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
with:
sarif_file: cla-backend-legacy/gosec-results.sarif
category: gosec

- name: Upload Gosec SARIF as artifact (fork PR - security tab write not available)
uses: actions/upload-artifact@v4
if: always() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
with:
name: gosec-results-sarif
path: cla-backend-legacy/gosec-results.sarif
if-no-files-found: ignore

# govulncheck - official Go vulnerability scanner
- name: Go vulnerability check
working-directory: ./cla-backend-legacy
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...
continue-on-error: true

# staticcheck for additional Go analysis
- name: staticcheck
if: always()
working-directory: ./cla-backend-legacy
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/yarn-scan-backend-go-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
- ".yarn-audit-allowlist.json"
- ".github/workflows/yarn-scan-backend-go-pr.yml"

permissions:
contents: read

jobs:
yarn-scan-backend-go-pr:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/yarn-scan-backend-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
- ".yarn-audit-allowlist.json"
- ".github/workflows/yarn-scan-backend-pr.yml"

permissions:
contents: read

jobs:
yarn-scan-backend-pr:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ cla-backend/python-api.err
cla-backend-go/golang-api.err
cla-backend-go/golang-api.log
utils/otel_dd_go/otel_dd
utils/otel_dd_go/otel_dd_go
audit.json
spans*.json
*api_usage*.csv
Expand All @@ -286,3 +287,4 @@ spans*.json
*.test
*.out
CLAUDE.md
.claude/*
36 changes: 2 additions & 34 deletions .yarn-audit-allowlist.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,5 @@
{
"minSeverity": "high",
"allowlist": [
1111997,
1115552,
1116289,
1115805,
1115806,
1116365,
1116473,
1116454,
1116478,
1117083,
1117575,
1117590,
1117592,
1117673,
1117726
],
"notes": {
"1111997": "aws-sdk v2 advisory flagged as 'No patch available' in our current baseline; accepted until migration.",
"1115552": "picomatch advisory introduced after the current lockfile baseline; temporarily allowlisted to restore CI while the transitive dependency upgrade is refreshed explicitly in backend yarn.lock files.",
"1116289": "basic-ftp CRLF injection advisory introduced after the rebased dev baseline; temporarily allowlisted to avoid widening this parity PR into a backend dependency refresh.",
"1115805": "lodash-es _.template advisory (GHSA-r5fr-rjxr-66jc / CVE-2026-4800). Temporary CI allowlist to avoid widening this parity PR into a backend dependency refresh.",
"1115806": "lodash _.template advisory (GHSA-r5fr-rjxr-66jc / CVE-2026-4800). Temporary CI allowlist to avoid widening this parity PR into a backend dependency refresh.",
"1116365": "Axios has a NO_PROXY Hostname Normalization Bypass Leads to SSRF",
"1116473": "Axios has Unrestricted Cloud Metadata Exfiltration via Header Injection Chain",
"1116454": "basic-ftp: Incomplete CRLF Injection Protection Allows Arbitrary FTP Command Execution via Credentials and MKD Commands",
"1116478": "basic-ftp has FTP Command Injection via CRLF",
"1117083": "basic-ftp DoS via Client.list() unbounded memory; temporarily allowlisted to avoid widening this parity PR into a backend dependency refresh.",
"1117575": "axios CVE-2025-62718 NO_PROXY bypass via 127.0.0.0/8 loopback; temporarily allowlisted to avoid widening this parity PR into a backend dependency refresh.",
"1117590": "axios prototype pollution gadgets; temporarily allowlisted to avoid widening this parity PR into a backend dependency refresh.",
"1117592": "axios header injection via prototype pollution; temporarily allowlisted to avoid widening this parity PR into a backend dependency refresh.",
"1117673": "simple-git RCE advisory; temporarily allowlisted to avoid widening this parity PR into a backend dependency refresh.",
"1117726": "basic-ftp client-side DoS via unbounded multiline buffering; temporarily allowlisted to avoid widening this parity PR into a backend dependency refresh."
}
"allowlist": [],
"notes": {}
}
2 changes: 1 addition & 1 deletion cla-backend-go/cmd/server_standalone.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func runServer(cmd *cobra.Command, args []string) {
errs <- http.ListenAndServe(fmt.Sprintf(":%d", viper.GetInt("PORT")), handler) // nolint gosec no support for setting timeouts
}()
go func() {
c := make(chan os.Signal)
c := make(chan os.Signal, 1)
signal.Notify(c, syscall.SIGINT) // nolint
errs <- fmt.Errorf("%s", <-c)
}()
Expand Down
58 changes: 53 additions & 5 deletions cla-backend-go/github/github_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -2597,28 +2597,76 @@ func GetReturnURL(ctx context.Context, installationID, repositoryID int64, pullR
"pullRequestID": pullRequestID,
}

client, err := NewGithubAppClient(installationID)
if installationID <= 0 {
err := errors.New("invalid installation ID")
log.WithFields(f).WithError(err).Warn("invalid installation ID")
return "", err
}
if repositoryID <= 0 {
err := errors.New("invalid repository ID")
log.WithFields(f).WithError(err).Warn("invalid repository ID")
return "", err
}
if pullRequestID <= 0 {
err := errors.New("invalid pull request ID")
log.WithFields(f).WithError(err).Warn("invalid pull request ID")
return "", err
}

client, err := NewGithubAppClient(installationID)
if err != nil {
log.WithFields(f).WithError(err).Warn("unable to create Github client")
return "", err
}

log.WithFields(f).Debugf("getting github repository by id: %d", repositoryID)
repo, _, err := client.Repositories.GetByID(ctx, repositoryID)
repo, resp, err := client.Repositories.GetByID(ctx, repositoryID)
if err != nil {
if ok, wrapped := CheckAndWrapForKnownErrors(resp, err); ok {
log.WithFields(f).WithError(wrapped).Warnf("unable to get repository by ID: %d", repositoryID)
return "", wrapped
}
log.WithFields(f).WithError(err).Warnf("unable to get repository by ID: %d", repositoryID)
return "", err
}
if repo == nil {
err := fmt.Errorf("missing repository for repository ID %d", repositoryID)
log.WithFields(f).WithError(err).Warn("invalid repository metadata")
return "", err
}

owner := repo.GetOwner().GetLogin()
name := repo.GetName()
if owner == "" || name == "" {
err := fmt.Errorf("invalid repository owner/name for repository ID %d", repositoryID)
log.WithFields(f).WithError(err).Warn("invalid repository metadata")
return "", err
}

log.WithFields(f).Debugf("getting pull request by id: %d", pullRequestID)
pullRequest, _, err := client.PullRequests.Get(ctx, *repo.Owner.Login, *repo.Name, pullRequestID)
pullRequest, resp, err := client.PullRequests.Get(ctx, owner, name, pullRequestID)
if err != nil {
if ok, wrapped := CheckAndWrapForKnownErrors(resp, err); ok {
log.WithFields(f).WithError(wrapped).Warnf("unable to get pull request by ID: %d", pullRequestID)
return "", wrapped
}
log.WithFields(f).WithError(err).Warnf("unable to get pull request by ID: %d", pullRequestID)
return "", err
}
if pullRequest == nil {
err := fmt.Errorf("missing pull request %d/%s/%s", pullRequestID, owner, name)
log.WithFields(f).WithError(err).Warn("invalid pull request metadata")
return "", err
}

htmlURL := pullRequest.GetHTMLURL()
if htmlURL == "" {
err := fmt.Errorf("missing html url for pull request %d/%s/%s", pullRequestID, owner, name)
log.WithFields(f).WithError(err).Warn("invalid pull request metadata")
return "", err
}

log.WithFields(f).Debugf("returning pull request html url: %s", *pullRequest.HTMLURL)
log.WithFields(f).Debugf("returning pull request html url: %s", htmlURL)

return *pullRequest.HTMLURL, nil
return htmlURL, nil
}
Loading
Loading