Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
codebuilder
Advanced tools
An AWS CodeBuild project optimized for multiple source repos & any combination of buildspec based scripts from config values
An AWS CodeBuild project optimized for multiple source repos & any combination of buildspec based scripts from config values. This is achieved by pointing a single CodeBuild project to this projects CI tooling and moving buildspec.yml
build phases to environment variables.
Inspiration:
Read through terraform/main.tf
and update variable names for your environment and remote state s3 bucket.
Create the s3 bucket for terraform remote state:
BUCKET=codebuilder-tf npm run tf:create:remote
Initialize the terraform state
npm run tf:init
Run terraform plan
to see what resources will be provisioned
npm run tf:plan
If that looks right, run terraform apply
to creae the resources in AWS
npm run tf:apply
Replace bucket name with the bucket created via terraform.
BUCKET=codebuilder-tools npm run upload-tools
Replace the placeholder lambda function code that terraform uploaded by deploying the new code with claudia.js.
npm run claudia:update
This example will clone, test, build, and deploy a static react site to s3.
First create a bucket and configure it for static site hosting. (For convenience I've added those scripts to this project)
BUCKET=sample-create-react-app npm run s3:create-bucket
BUCKET=sample-create-react-app npm run s3:configure-bucket
Start your first codebuilder state function by running:
npm run codebuilder
The following config variables determine which project and branch to build
CI_REPO
# example: CI_REPO=eddywashere/sample-create-react-app
CI_COMMIT
# example: CI_COMMIT=feature-branch
# example: CI_COMMIT=c420de0
The following config variables are available to dynamically set your scripts in the CodeBuild execution.
CI_SCRIPT_INSTALL
# example: CI_SCRIPT_INSTALL="npm install yarn -g && yarn install --silent"
CI_SCRIPT_PRE_BUILD
# example: CI_SCRIPT_PRE_BUILD="npm run test"
CI_SCRIPT_BUILD
# example: CI_SCRIPT_BUILD="npm run build"
CI_SCRIPT_POST_BUILD
# example: CI_SCRIPT_POST_BUILD="npm run s3:upload"
Each project that you'd like to run scripts against should use parameter store to get encrypted secrets.
FAQs
An AWS CodeBuild project optimized for multiple source repos & any combination of buildspec based scripts from config values
We found that codebuilder demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.