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.
asset-assistant
Advanced tools
## Versions The 0.0.* versions are for building up the repository and may have changes in the command specification.
The 0.0.* versions are for building up the repository and may have changes in the command specification.
The "assets" program is motivated by the need to automate the copying of assets from npm modules. The typical use case is for images and css files that need to be moved to a location accessible by the web server. It is assumed that javascript code will be packed and run from a single 'root' location. The goal is to keep all asset update instructions out of the source code.
These programs are intended to be used with the npm package manager. As such they make use of the package.json file and the node_modules directory. All file selections use the Glob package.
Copy all asset files from source directories and source packages to a specified build directory.
Add <script>
and <link>
tags to an html file based upon directory
contents.
The typical use case is to copy 'asset' files, such as .css, images, sound, etc. , from a package directory to a directory the deployed application has access to. The root package does not require the 'assets' field, and when ommited will only look in packages for 'asset' files.
The 'asset' program will look for an "assets" field in the package.json file. This field can contain the following fields:
The asset command accepts the following flags
"dependencies": {
"Collection": "file:../Collection",
"Context": "file:../Context",
"asset-assistant": "file:D:/project-local/assets",
"jquery": "^3.3.1",
"nidget": "file:../Nidget"
},
"scripts": {
"build-assets": "assets",
"build-remote": "assets --fileset=local-src",
"inject-header": "inject src/* src/css/* index.html"
},
"assets": {
"src": [
"src/assets/**/*",
"src/css/dialog.css"
],
"local-src": [
"src/*.html"
]
}
The script 'build-assets' will recursively copy all files in the src/assets directory into the build/src/assets directory. It will also copy 'dialog.css' into the build/css directory. It will then look for the "assets" parameter in the package.json of all dependencies (Collection, Context, etc), if found it will copy files specified by their 'src' parameters and recursively look in their dependencies for more assets. If not found then the recursive search will not follow that branch.
The script 'build-remote' will copy all html files from src/html to build/html, and will not recursive search.
The script 'inject-header' will add a <script>
or <link>
element into
'index.html' for each .js and .css file found. The paths will be relative to
the location of 'index.html'.
FAQs
A lightweight tool for copying files from other packages.
The npm package asset-assistant receives a total of 0 weekly downloads. As such, asset-assistant popularity was classified as not popular.
We found that asset-assistant 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’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.