Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@jill64/types-lambda
Advanced tools
Unofficial AWS Lambda type definition
npm i -D @jill64/types-lambda
import type { LambdaHandler } from '@jill64/types-lambda'
const url = 'https://aws.amazon.com/'
export const handler: LambdaHandler = async (event) => {
try {
const res = await fetch(url)
console.info('status', res.status)
return res.status
} catch (e) {
console.error(e)
return 500
}
}
import { awslambda } from '@jill64/types-lambda'
export const handler = awslambda.streamifyResponse(
async (event, responseStream, _context) => {
const metadata = {
statusCode: 200,
headers: {
'Content-Type': 'application/json',
CustomHeader: 'outerspace'
}
}
responseStream = awslambda.HttpResponseStream.from(responseStream, metadata)
responseStream.write('Streaming with Helper \n')
responseStream.write('Hello 0 \n')
responseStream.write('Hello 1 \n')
responseStream.write('Hello 2 \n')
responseStream.end()
await responseStream.finished()
}
)
import type { OriginRequestHandler } from '@jill64/types-lambda'
export const handler: OriginRequestHandler = async (event, context) => {
const response = event.Records[0].cf.response
const headers = response.headers
const headerNameSrc = 'X-Amz-Meta-Last-Modified'
const headerNameDst = 'Last-Modified'
if (headers[headerNameSrc.toLowerCase()]) {
headers[headerNameDst.toLowerCase()] = [
headers[headerNameSrc.toLowerCase()][0]
]
console.log(
`Response header "${headerNameDst}" was set to ` +
`"${headers[headerNameDst.toLowerCase()][0].value}"`
)
}
return response
}
FAQs
λ Unofficial AWS Lambda type definition
We found that @jill64/types-lambda demonstrated a healthy version release cadence and project activity because the last version was released less than 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
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.