Expand description
SPARSE
Sparse is an acronym. It stands for.
- s - smashmaster's
- p - pretty/painfully/private
- a - annoying/advanced/abysmal
- r - reverse/rewritten/reimagined
- s - scoring/syshardening/security
- e - engine
Beautiful Docs
npm run docs :)
Notes
docs watch is broken
Compiling to full version
./publish.sh on linux/unix system (mac), it'll invoke pkg and make 3 binaries: windows, linux, and statically linked linux.
Targets
Linux has two binaries, statically linked is the one to use if the normal one is fucked up because it packages it's own libraries which can resolve some rare issues. Windows is a single exe for both Server and non-server, you just change the case you're using. In order for natives to work for each platform, we take advantage of github actions as ci so development environments for each platform should be the same platform to achieve optimal interop. Crossplatform development works but may not be as easy.
Terminology
We refer to non-server windows as "consumer" windows. Each use case is called a "case". Each of these so cases will contain "groups" of "checks", "diffivews" and "herustics" which give numbers. In addition when run in "apply" mode, cases may contain mini "scripts" that will run.
Operation Modes (new)
The numbers are for command line flags. The implementation can be seen in main.ts.
- Auditing: Check everything according to the internal configuration, report all inaccuracies.
- Snapshoting: Pull a clean system's data and generate resource files. Requires
--rwflag to selfextract files into a temporary editable location. Afterwards the operator should manually update the generated files with a simple overwrite. - Applying: MAKE EVERYTHING ACCORDING TO POLICY AND EXECUTE ANY SCRIPTS. This may be destructive.
Namespaces
Enumerations
Classes
Command, but it passes the command to bash via the -c flag.
Each use case for the tool should be declared as case which is a chain of elements (ideally groups and checks). Examples include "Ubuntu 22.04", "Fedora 36", "Windows", "CIS Benchmark Compilance", "System security check", and "Sanity Check"
Check, when run it returns good or bad.
Produces by running a shell command.
Global config object.
Patch file difference view. Shows how altered a file is from a standard install. Lazy loaded to avoid large diffs crashing browser.
An on-screen element that shows up the one report
File producer that reads and returns file when run.
A renderer that is customized through handlebars. Should be applicable for most use cases.
A group of elements. Will render as a collapsible section for easy browsing.
Like a check but returns a value from 0 to 1 indicating how likely it thins something is wrong.
Possibly problematic thing. Not meant to be used directly. Stuff should subclass this.
Similar to the above but I troll with powershell.
A producer is an object that returns a string when it's produce method is invoked. See it's subclasses, but most things will support Producer vs Producer comparisons so we don't need a dedicated check for shell command output vs a bundled file.
A renderer displays data from elements by generating html.
Mini Script that runs without arguments.
Command, but it passes the command to /bin/sh (most likely linked to dash) via the -c flag.
Just produces a single constant string. For trivial situations
Testing docs