Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Use the Node fs
API in Chrome Apps
This module is used by chromiumify
This library can be used directly with your browserify builds with targeting Chrome Packaged Apps.
$ npm install chrome-fs --save
$ browserify -r chrome-fs:fs index.js -o bundle.js
This list is based on the node.js documentation https://nodejs.org/api/fs.html Sync apis won't be supported they are listed here https://github.com/No9/chrome-fs/wiki/API-Mapping
$ npm test
This will load the folder test/chrome-app
as an unpacked extension in chrome.
Test currently designed for Chrome on Windows and Linux Canary on Mac other variants accepted
It is recommended that the following permissions are added to your chrome packaged app for this module.
"permissions": [
"unlimitedStorage"
]
Chrome Packaged Apps don't have the notion of current working directory CWD
.
So relative paths are not escapted they are trimmed to be relative from root
i.e.
../../direct1/file1
Will resolve to /direct1/file1
.
Will resolve to /
Chrome Packaged Apps allow you to see and edit the filesystem from the dev tools so the chown, fchown, chmod, fmod
calls are there for compatibility only.
Any chown call will not be reflected in stat
Best effort has been made to support stat
but the Chrome File System is not a complete implementation.
Files have size
and last modified
but directories have no size and default to the start of epoc for last modified.
Currently only UTF-8 is supported
There seems to be an issue around saving files in chomefs
anton whalley @no9
FAQs
Use the Node `fs` API in Chrome Apps
We found that chrome-fs 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.
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.
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.