Skip to content

test(sources/s3): fix missing region error #4131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 8, 2025

Conversation

Juneezee
Copy link
Contributor

@Juneezee Juneezee commented May 8, 2025

Description:

Fixes #4069.

@rosecodym Apologies. I overlooked this and mistakenly assumed that the CI environment had the AWS_REGION variable set. Unfortunately, it doesn't, and that caused the failure on the main branch. This PR should fix that.

https://github.com/trufflesecurity/trufflehog/actions/runs/14910724831/job/41884134392#step:6:1277

=== FAIL: pkg/sources/s3 TestSource_Chunks/gets_chunks_after_assuming_role (unknown)
2025-05-08T16:06:01Z	info-0	context	Creating checkpointer	{"timeout": 30}
    s3_test.go:123: Source.Chunks() error = role "arn:aws:iam::619888638459:role/s3-test-assume-role" could not list any s3 buckets for scanning: operation error S3: ListBuckets, get identity: get credentials: failed to refresh cached credentials, operation error STS: AssumeRole, failed to resolve service endpoint, endpoint rule error, Invalid Configuration: Missing Region, wantErr false

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

Fixes: 5f56550 ("feat(sources/s3): migrate to AWS SDK v2 (#4069)")
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
@Juneezee Juneezee requested review from a team as code owners May 8, 2025 18:36
@ahrav
Copy link
Collaborator

ahrav commented May 8, 2025

Thank you @Juneezee

@ahrav ahrav merged commit 90190de into trufflesecurity:main May 8, 2025
13 checks passed
abmussani added a commit to abmussani/trufflehog that referenced this pull request May 16, 2025
* main:
  [Feat] Added Mux API Analyzer (trufflesecurity#4128)
  fixed name of netlify analyzer in cli output (trufflesecurity#4140)
  fix(discordwebhook): Update Discord webhook detector to support 19-digit IDs (trufflesecurity#4133)
  [Feat] Added New AccuWeather Detector Version (trufflesecurity#4114)
  [Feat] Added Ngrok API Key Analyzer (trufflesecurity#4110)
  Improved JDBC Detector Regex (trufflesecurity#4109)
  [Feat] Detector implementation for Azure Configuration Connection String Key (trufflesecurity#3939)
  test(sources/s3): fix missing region error (trufflesecurity#4131)
  feat(sources/s3): migrate to AWS SDK v2 (trufflesecurity#4069)
  Update PreCommit.md (trufflesecurity#4112)
  Exclusion of FalsePositive GH's usernames in PrivateKeyDetector (trufflesecurity#4046)
  Monday App Analyzer (trufflesecurity#4120)
  [Feat] Detector implementation for Azure API Management Direct Management Key (trufflesecurity#3938)
  Fastly Analyzer (trufflesecurity#4082)
  Postman Code Uses Consistent Casing for Id Var Names (trufflesecurity#4124)
  Normalize UID to Uid in Postman Code (trufflesecurity#4125)
  postman_client.IDNameUUID becomes IdNameUid (trufflesecurity#4123)
  Fixed Kontent Detector (trufflesecurity#4122)

# Conflicts:
#	pkg/analyzer/analyzers/analyzers.go
#	pkg/analyzer/cli.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants