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.
@octopusdeploy/step-packages-public-feed-encryption
Advanced tools
A package that facilitates the generation of an encrypted signature for step package public feed. The encryption method follows the convention of [AWS Signature Version 4](https://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html).
A package that facilitates the generation of an encrypted signature for step package public feed. The encryption method follows the convention of AWS Signature Version 4.
npm i @octopusdeploy/step-packages-public-feed-encryption
pnpm i @octopusdeploy/step-packages-public-feed-encryption
import { createHash } from "@octopusdeploy/step-packages-public-feed-encryption";
const stringToEncrypt = "";
const hash = createHash("sha256", stringToEncrypt);
import { createHmac } from "@octopusdeploy/step-packages-public-feed-encryption";
const stringToEncrypt = "";
const secretKey = process.env["SECRET_KEY"];
const hmac = createHmac("sha256", stringToEncrypt, secretKey);
import { createSignature, KeyValuePair } from "@octopusdeploy/step-packages-public-feed-encryption";
The createSignature
will generate the encrypted request signature. The signature will then be attached to the request's header before the request is sent to the step package public feed server. The function requires these parameters:
algorithm
(string): the algorithm used to encrypt the signature. ex: "sha265"
secretKey
(string): the secret key which is associated with the Azure Function's API key.httpMethod
(string): the HTTP method of the request. ex: "POST"
headers
(KeyValuePair[]): the KeyValuePair list of the HTTP request's header.payloads
(KeyValuePair[]): the KeyValuePair list of the HTTP request's content.requestTimestamp
(string): the ISO string of the request's timestamp. ex: "1975-08-19T23:15:30.000Z"
// Create request signature
const requestMethod = "POST";
const requestTimestamp = new Date().toJSON();
const requestHeader: Record<string, string> = {
"x-functions-key": apiKey,
"content-length": contentLength.toString(),
timestamp: requestTimestamp,
};
const packageFile = readFileSync(packageToPublish, { encoding: "base64" });
const payloads: KeyValuePair[] = [
{
key: "package",
value: packageFile,
},
{
key: "manifest",
value: JSON.stringify(manifest),
},
];
requestHeader["signature"] = createSignature(
"sha256",
secretKey,
requestMethod,
Object.entries(requestHeader).map(([key, value]) => ({ key, value })),
payloads,
requestTimestamp
);
FAQs
A package that facilitates the generation of an encrypted signature for step package public feed. The encryption method follows the convention of [AWS Signature Version 4](https://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html).
The npm package @octopusdeploy/step-packages-public-feed-encryption receives a total of 112 weekly downloads. As such, @octopusdeploy/step-packages-public-feed-encryption popularity was classified as not popular.
We found that @octopusdeploy/step-packages-public-feed-encryption demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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.