Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Don't hard-code your AMIs, and don't copy and paste JSON/YAML maps! Use this package instead.
For instance, rather than copy and pasting this into every program you create:
import * as aws from "@pulumi/aws";
const instanceTypeToArch: {[instanceType: string]: string} = {
"t1.micro" : "PV64" ,
"t2.nano" : "HVM64",
"t2.micro" : "HVM64",
"t2.small" : "HVM64",
"t2.medium" : "HVM64",
"t2.large" : "HVM64",
// etc, etc, etc
};
const regionArchToAmi: {[region: string]: {[arch: string]: string}} = {
"us-east-1" : {"PV64" : "ami-2a69aa47", "HVM64" : "ami-97785bed", "HVMG2" : "ami-0a6e3770"},
"us-west-2" : {"PV64" : "ami-7f77b31f", "HVM64" : "ami-f2d3638a", "HVMG2" : "ami-ee15a196"},
"us-west-1" : {"PV64" : "ami-a2490dc2", "HVM64" : "ami-824c4ee2", "HVMG2" : "ami-0da4a46d"},
"eu-west-1" : {"PV64" : "ami-4cdd453f", "HVM64" : "ami-d834aba1", "HVMG2" : "ami-af8013d6"},
"eu-west-2" : {"PV64" : "NOT_SUPPORTED", "HVM64" : "ami-403e2524", "HVMG2" : "NOT_SUPPORTED"},
// etc, etc, etc
};
export function getLinuxAmi(region: aws.Region, instanceType: aws.ec2.InstanceType): string {
let arch = instanceTypeToArch[instanceType];
let archToAmi = regionArchToAmi[region];
return archToAmi[arch];
}
let vm = new aws.ec2.Instance("webserver", {
ami: getLinuxAmi(..., ...),
});
and dealing with it being constantly out of date (missing regions, instance types, or outdated AMIs), you can simply call this library:
import * as aws from "@pulumi/aws";
import * as pawsami from "pawsami";
let vm = new aws.ec2.Instance("webserver, {
ami: pawsami.getLinuxAmi(..., ...),
});
FAQs
Don't hard-code your AMIs!
The npm package pawsami receives a total of 2 weekly downloads. As such, pawsami popularity was classified as not popular.
We found that pawsami 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.