Skip to content

Commit d255fd0

Browse files
committed
Use Sonatype Guide PAT for OSS Index audit
Ported from open-telemetry/opentelemetry-java-instrumentation#18515
1 parent 1b207c6 commit d255fd0

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

.github/repository-settings.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ private admin repo.
1010

1111
- `GPG_PASSWORD` - stored in OpenTelemetry-Java 1Password
1212
- `GPG_PRIVATE_KEY` - stored in OpenTelemetry-Java 1Password
13-
- `SONATYPE_OSS_INDEX_USER` - owned by [@jack-berg](https://github.com/jack-berg)
14-
- `SONATYPE_OSS_INDEX_PASSWORD` - owned by [@jack-berg](https://github.com/jack-berg)
13+
- `SONATYPE_GUIDE_PAT` - owned by [@jack-berg](https://github.com/jack-berg)
1514
- `SONATYPE_KEY` - owned by [@jack-berg](https://github.com/jack-berg)
1615
- `SONATYPE_USER` - owned by [@jack-berg](https://github.com/jack-berg)
1716

.github/workflows/oss-index-audit-daily.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ jobs:
2929
id: audit
3030
continue-on-error: true
3131
env:
32-
SONATYPE_OSS_INDEX_USER: ${{ secrets.SONATYPE_OSS_INDEX_USER }}
33-
SONATYPE_OSS_INDEX_PASSWORD: ${{ secrets.SONATYPE_OSS_INDEX_PASSWORD }}
32+
SONATYPE_GUIDE_PAT: ${{ secrets.SONATYPE_GUIDE_PAT }}
3433
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
3534

3635
- name: Print vulnerability report

buildSrc/src/main/kotlin/otel.java-conventions.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ checkstyle {
4949
}
5050

5151
ossIndexAudit {
52-
username = System.getenv("SONATYPE_OSS_INDEX_USER") ?: ""
53-
password = System.getenv("SONATYPE_OSS_INDEX_PASSWORD") ?: ""
52+
// Guide PAT authentication ignores this, but the scan plugin requires it.
53+
username = "unused"
54+
password = System.getenv("SONATYPE_GUIDE_PAT") ?: ""
5455
outputFormat = org.sonatype.gradle.plugins.scan.ossindex.OutputFormat.JSON_CYCLONE_DX_1_4
5556
isPrintBanner = false
5657
}

0 commit comments

Comments
 (0)