diff --git a/README.md b/README.md index 3f5724336..0d6560edb 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,12 @@ The MITRE Security Automation Framework (SAF) Command Line Interface (CLI) bring The SAF CLI is the successor to [Heimdall Tools](https://github.com/mitre/heimdall_tools) and [InSpec Tools](https://github.com/mitre/inspec_tools). -## Terminology: +## Terminology - "[Heimdall](https://github.com/mitre/heimdall2)" - Our visualizer for all security result data - "[Heimdall Data Format (HDF)](https://saf.mitre.org/#/normalize)" - Our common data format to preserve and transform security data -## Installation: +## Installation * [Via NPM](#installation-via-npm) * [Update via NPM](#update-via-npm) @@ -20,6 +20,9 @@ The SAF CLI is the successor to [Heimdall Tools](https://github.com/mitre/heimda * [Via Windows Installer](#installation-via-windows-installer) * [Update via Windows Installer](#update-via-windows-installer) +## Developers +For detail information about development, testing , and contributing to the SAF project refer to [MITRE SAF Develpment](https://github.com/mitre/saf/blob/main/docs/contributors-guide.md) + ## Usage ### Attest HDF Data diff --git a/docs/contributors-guide.md b/docs/contributors-guide.md index 5c4d4fb07..bf10a80d8 100644 --- a/docs/contributors-guide.md +++ b/docs/contributors-guide.md @@ -53,14 +53,20 @@ The 'utility' tests are located in the `./tests/utility` directory and organized npm run test:jest npm run test:jest:one ./tests/utility/calculations.test.ts ``` +### Run All Tests +To invoke all tests `chai` and `jest` use the following commands: +```bash +npm run test +npm run tests +``` ## Linting -We use ESLint with the TypeScript ESLint plugin for linting. To run the linter, use: +We use ESLint with the TypeScript ESLint plugin for linting. The command lint’s all TypeScript files found in the `scr` directory (including sub-directories). To run the linter, use: ```bash -npm run lint -npm run lint --fix +npm run lint:ci # Reports issues found, does not fix them +npm run lint # Invokes the --fix flag, fixes issues found ``` ## Building @@ -78,13 +84,15 @@ This script will clean the `lib` directory and compile the TypeScript files. Here's how you can use the CLI: ```bash -./bin/run command-name +./bin/run command-name # Darwin or Linux +node bin/run command-name # Windows ``` You can get help on the available commands with: ```bash -./bin/run --help +./bin/run --help # Darwin or Linux +node bin/run --help # Windows ``` ## Contributing diff --git a/package.json b/package.json index aedc084d6..7de921916 100644 --- a/package.json +++ b/package.json @@ -194,7 +194,9 @@ "scripts": { "lint": "eslint \"src/**/*.ts\" --fix", "lint:ci": "eslint \"src/**/*.ts\" --max-warnings 0", - "dev": "rm -rf lib && tsc && node bin/run", + "dev": "run-script-os", + "dev:win32": "(IF EXIST lib rmdir /s /q lib) && tsc && node bin/run", + "dev:darwin:linux": "rm -rf lib && tsc && node bin/run", "test": "npm run test:mocha && npm run test:jest", "tests": "npm run test", "test:mocha": "ts-mocha --timeout 25000 --forbid-only \"test/**/*.test.ts\"",