
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
The solution offers encryption and decryption of `.env` files to and from `.sec` files, the ability to run a command with the values of a `.env`/`.sec` file in its environment. The AWS plugin adds the ability to push selected `.env`/`.sec` entries to AWS
The solution offers encryption and decryption of .env files to and from .sec files, the ability to run a command with the values of a .env/.sec file in its environment. The AWS plugin adds the ability to push selected .env/.sec entries to AWS Systems Manager Parameter Store and AWS Secrets Manager.
Currently there are two methods of encryption supported:
@dotsec/plugin-pke - Using Public Key Encryption@dotsec/plugin-aws - Using AWS Key Management Service (AWS KMS)Environment variables are a great way to configure your application. However, they shouldn't be committed to your repository. This is because they often contain sensitive information, like passwords, API keys, and other secrets. This is where dotsec comes in. It allows you to encrypt your environment variables, and store them in a .sec file, which can be committed to your repository.
.env files to .sec files..sec files to .env files..env file in its environment..sec file in its environment..env/.sec entries to AWS Systems Manager Parameter Store..env/.sec entries to AWS Secrets Manager.SYMMETRIC_DEFAULTRSA_2048
RSAES_OAEP_SHA_256RSA_3072
RSAES_OAEP_SHA_256RSA_4096
RSAES_OAEP_SHA_256SM2PKEnpm install --save-dev dotsec @dotsec/plugin-aws
Add the folowing to dotsec.config.ts:
import { DotsecPluginAws } from "@dotsec/plugin-aws";
import { DotsecConfig } from "dotsec";
export const dotsec: DotsecConfig<{ plugins: DotsecPluginAws }> = {
defaults: {
encryptionEngine: "aws",
},
};
If you don't have a .env file, create one:
I_CAN_SEE="clearly now"
SINGING="in the rain"
I_BLESS_THE_RAINS="down in Africa"
npx dotsec run --with-env node -e "console.log(process.env.I_BLESS_THE_RAINS)"
npx dotsec encrypt
npx dotsec run --with-sec node -e "console.log(process.env.I_BLESS_THE_RAINS)"
npx dotsec decrypt
Edit the dotsec.config.ts file. Add the following to the aws object:
{
...
variables: {
"I_BLESS_THE_RAINS": {
push: {
aws: {
ssm: true
}
}
}
}
}
Run the following command:
npx dotsec push
You might want to set AWS_REGION before running the command. If you don't, the region will be set to
eu-west-1.
.sec and dotsec.config.ts file alongside your code?Yes it is. But it is up to you to make sure that access to the KMS key is restricted to the people who need to decrypt and/or encrypt the .sec file.
We do, however, since this package is relatively new, I don't think you should.
dotsec.config()node -r dotsec/register index.js.env file changes and automatically encryptFAQs
The solution offers encryption and decryption of `.env` files to and from `.sec` files, the ability to run a command with the values of a `.env`/`.sec` file in its environment. The AWS plugin adds the ability to push selected `.env`/`.sec` entries to AWS
The npm package dotsec receives a total of 363 weekly downloads. As such, dotsec popularity was classified as not popular.
We found that dotsec 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.