Commit Graph
6 Commits
Author SHA1 Message Date
Mustansir 964eab023f [INS-232] Fix S3 Source "panic: runtime error: index out of range" bug (#4610)
* use separate checkpointer instance for each scanBucket call, add index out of range check in checkpointer
2026-01-09 12:39:55 +05:00
Muneeb Ullah Khan 8c1219a4f0 [INS-207] Add Role-Aware Resumption Support for Legacy S3 Scan (#4600)
* Added roles to legacy scan resumption

* Test to verify legacy chunks resumption with roles.
2025-12-17 19:00:40 +05:00
MustansirandAmaan Ullah b6389e2419 [INS-104] Support units in S3 source (#4560)
* implemented Source unit for S3.
Implemented. integration test

* use bucket as source unit

* remove code duplication, reuse from Chunks

* remove unnecessary change

* remove unused functions

* revisit tests

* revert unnecessary change

* change SourceUnitKind to s3_bucket

* handle nil objectCount inside scanBucket

* handle nil objectCount outside loop

* add bucket to resume log

* add bucket and role to error log, remove enumerating log

* implement sub unit resumption

* add comment to checkpointer for unit scans

* implement SourceUnitUnmarshaller on source with the new S3SourceUnit, add test to test resumption on multiple buckets with concurrent ChunkUnit processing

* add role to SourceUnitID

* Revert "add role to SourceUnitID"

This reverts commit 549e6bede9.

* add role to source unit ID, keep track of resumption using source unit ID instead of just bucket name

* rename bucket -> unitID in UnmarshalSourceUnit

---------

Co-authored-by: Amaan Ullah <aman.ullah.jalal@trufflesec.com>
2025-12-04 12:54:28 +05:00
Eng Zer Jun 5f56550804 feat(sources/s3): migrate to AWS SDK v2 (#4069)
Closes #4054.

This PR migrates the S3 source to use AWS SDK v2 by following the migration guide https://docs.aws.amazon.com/sdk-for-go/v2/developer-guide/migrate-gosdk.html. This brings compatibility improvements and better long-term support from AWS.

To verify the changes manually, I:

Created a test S3 bucket.
Uploaded sample files containing dummy secrets.
Set up an IAM role for access.
Ran trufflehog s3 and confirmed it behaves as expected post-migration.

additional notes by @rosecodym: The existing S3 automated tests passed, modulo some flakiness that we will address in a follow-up commit.
2025-05-08 11:55:43 -04:00
ahrav 827a201d2d [chore] - remove resumption option (#3830)
* remove resumption option

* undo

* undo
2025-01-06 12:00:56 -08:00
ahrav 9a6cad97a3 [refactor] - Rename S3 ProgressTracker (#3652)
* rename

* update

* fix typo
2024-11-22 09:27:10 -08:00