Skip to content

Commit 44a19c6

Browse files
committed
fix: resolve security scan failures
- Upgrade Go from 1.24.11 to 1.24.12 to fix stdlib vulnerabilities (GO-2026-4340: crypto/tls, GO-2026-4341: net/url) - Add #nosec G101 annotation for fake test credentials in testutil.go - Explicitly ignore os.Setenv errors in acctest.go (G104)
1 parent c656df9 commit 44a19c6

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/ory/terraform-provider-orynetwork
22

3-
go 1.24.11
3+
go 1.24.12
44

55
require (
66
github.com/hashicorp/terraform-plugin-framework v1.16.1

internal/acctest/acctest.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,11 @@ func AccPreCheck(t *testing.T) {
7171
}
7272

7373
// Set environment variables for the provider to use
74-
os.Setenv("ORY_PROJECT_ID", project.ID)
75-
os.Setenv("ORY_PROJECT_SLUG", project.Slug)
76-
os.Setenv("ORY_PROJECT_API_KEY", project.APIKey)
77-
os.Setenv("ORY_PROJECT_ENVIRONMENT", project.Environment)
74+
// Errors are intentionally ignored as os.Setenv only fails on invalid key names
75+
_ = os.Setenv("ORY_PROJECT_ID", project.ID)
76+
_ = os.Setenv("ORY_PROJECT_SLUG", project.Slug)
77+
_ = os.Setenv("ORY_PROJECT_API_KEY", project.APIKey)
78+
_ = os.Setenv("ORY_PROJECT_ENVIRONMENT", project.Environment)
7879
}
7980

8081
// GetTestProject returns the shared test project, loading from env vars or creating if necessary.

internal/testutil/testutil.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const (
2323
)
2424

2525
// Test API key constants - fake keys for unit tests
26+
// #nosec G101 -- These are intentionally fake test credentials, not real secrets
2627
const (
2728
// TestWorkspaceAPIKey is a fake workspace API key for tests.
2829
TestWorkspaceAPIKey = "ory_wak_test"

0 commit comments

Comments
 (0)