![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
github.com/gulien/aws-s3-csv-parser
A simple CLI which downloads a CSV file from S3 and inserts its data into a MySQL database.
Usage of aws-s3-csv-parser:
--bucket string Set the AWS S3 bucket
--key string Set the AWS S3 object key to download
--region string Set the AWS region
--skip-download Skip download if true (i.e, file has already been downloaded)
--timeout int Set the maximum duration in seconds before timing out (default 300)
The CSV file will, at least in the near future, always:
,
as separatorThe steps could be summarized to:
Most of the core logic can be found in the pkg
folder, while the main
file glues everything together.
In other words, one could move from a command to any other trigger (REST API, lambda, consumer) without having to change
the core logic.
Also, both the file storage (i.e, S3) and data source (i.e, MySQL) could be changed in the future by implementing the
filestorage.Downloader
and datastorage.Inserter
interfaces.
If the process fails for whatever reasons, one may relaunch the process from the start. Indeed, current implementation
ignores the MySQL Error 1062: Duplicate entry
error.
As we may not want to rely on manual intervention to trigger the process, we can imagine two different solutions.
The first one relies on AWS lambdas:
Everytime a new object (i.e., CSV file) is put into the S3 bucket, an event triggers a lambda which handles the process. This solution is cost-effective, but we might encounter some limitations in the future (e.g, reaching the lambda execution time limit if the CSV file is too big).
To work around those limitations, the second solution relies on a messages' queue + consumer:
📣 We could also switch from a MySQL database (i.e., AWS RDS) to DynamoDB serverless for saving even more money, but I do believe that SQL > No-SQL for data analysis.
Requirements
Makefile commands
make up
- Starts the MySQL database and phpMyAdmin Docker containersmake down
- Stops the MySQL database and phpMyAdmin Docker containersmake fmt
- Shortcut for go fmt
and go mod tidy
make lint
- Runs lintersmake todos
- Shows TODOsmake godoc
- Runs a local webserver for godocmake run
- Runs the application (REGION
, BUCKET
, KEY
, TIMEOUT
and SKIP_DOWNLOAD
are available as variables, i.e, make run BUCKET=foo
)make build
- Builds the application (VERSION
is available as variable, i.e, make build VERSION=foo
)FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.