feat(scopes): pruefwerk:uploads.write for uploads to targets
ci / shared (pull_request) Successful in 15s
ci / test (pull_request) Successful in 8m6s
ci / image (pull_request) Skipped

The read-only TIA Portal connector (pruefwerk epic #1095, #1090/#1094)
runs on the customer's machine and uploads a TIA export with a
workspace API key: POST /api/v1/targets/{id}/artifacts/upload. The new
scope needs the pruefwerk entitlement; integration keys don't get it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sharang ParnerkarandClaude Opus 5.5 committed 2026-12-01 13:55:37 +01:00
1 parent cc12c6c810
commit 0f9433c52d
2 files changed
+14

No files matched your search

+3
View File
@@ -30,6 +30,9 @@ var catalogue = []Scope{
{"pruefwerk:sbom.read", "pruefwerk", "Read SBOMs, licences and SBOM quality"},
{"pruefwerk:scans.read", "pruefwerk", "Read scan runs"},
{"pruefwerk:scans.run", "pruefwerk", "Start scans"},
// The TIA Portal connector (pruefwerk #1090/#1094) uploads exports with a
// workspace key: POST /api/v1/targets/{id}/artifacts/upload.
{"pruefwerk:uploads.write", "pruefwerk", "Upload files to targets"},
{"werkbank:admin", "pruefwerk", "Manage Werkbank runners"},
{"werkbank:runner", "pruefwerk", "Act as a Werkbank runner"},
{"werkpilot:licence", "werkpilot", "Fetch a Werkpilot CLI licence without a browser (CI)"},
+11
View File
@@ -45,3 +45,14 @@ func TestProductsAndEffective(t *testing.T) {
t.Fatalf("Effective = %v, want %v", got, want)
}
}
func TestUploadsWrite(t *testing.T) {
s, ok := Lookup("pruefwerk:uploads.write")
if !ok || s.Product != "pruefwerk" {
t.Fatalf("pruefwerk:uploads.write: %+v %v", s, ok)
}
got, err := Validate([]string{"pruefwerk:uploads.write", "pruefwerk:scans.run"}, "pruefwerk")
if err != nil || !reflect.DeepEqual(got, []string{"pruefwerk:scans.run", "pruefwerk:uploads.write"}) {
t.Fatalf("Validate: %v %v", got, err)
}
}