0.1.9 • Published 4 years ago
@iac-factory/tty-testing v0.1.9
@iac-factory/tty-testing
Demonstrative npm package that highlights the different methods, and limitations,
of spawning child-processes via node.js runtimes.
Note - Anything with a ⓘ is a dropdown containing
additional, contextual information.
Usage(s)
Disclaimer
CLI utilities can be incredibly dangerous.
stdin,os.exec, and shells are easy to interface and therefore exploit.- Having the ability to issue
os.execor interfacestdinalways makes the application dangerous. - Protecting against harmful bugs or malicious actors isn't difficult if
the application's logic is handled correctly, and so long as precautions are made
to disable
REPLs(but allowingSIGKILL,SIGSTOP, and other user-controlled signals).
A language's packaging utility (npx, pep, cargo, etc.) extends some amazing capabilities,
but should never have the opportunity to be taken advantage of (Development Supply-Chain Attacks).
Ensure due diligence in writing cli applications.
Global
npx --yes @iac-factory/tty-testing@latest --always-spawn System
npm install --global @iac-factory/tty-testing@latest && tty-testingLocal
npm run startSetup (Development)
Please note: the following section is only required if usage
relates to local development where the tty-testing package
is locally cloned.
All other usage can be limited to npx or otherwise a system
install of @iac-factory/tty-testing.
# --> (1) Clone the repository
# --> (2) Change into the local clone's directory
# --> (3) Install package dependencies
git clone "https://github.com/iac-factory/tty-testing.git" \
|| git clone git@github.com:iac-factory/tty-testing.git
cd tty-testing && npm install