
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
@wecity/script-env-config
Advanced tools
解决问题:打包后,可以修改配置文件,执行后置脚本替换项目内所有资源路径
- 1、使用插件后,前端构建目录下会创建名为env.config以及名为env.sh的两个文件
- 2、env.config:配置资源路径地址,动态修改此配置后,需执行env.sh来重新生成物料包
- 3、env.sh:执行替换脚本,一般情况下不需要手动修改
yarn add @wecity/script-env-config
const ScriptEnvConfig = require('@wecity/script-env-config').default
module.exports = {
...
chainWebpack: config => {
config.plugin('script-env-config').use(
new ScriptEnvConfig({
var: '==@SCRIPT-ENV-CONFIG-VAR@==',
resourcePrefix: '/test123/ccc'
})
)
},
...
}
# 如构建目录在dist下
cd dist
sh ./env.sh
执行构建完成后,在构建目录下执行 sh ./env.sh 即可根据env.config配置内容创建物料包
FAQs
## 后置脚本替换资源路径
We found that @wecity/script-env-config demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 18 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
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.