-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Build | ||
run-name: ${{ github.actor }} is testing out github actions | ||
permissions: | ||
contents: write | ||
pages: write | ||
id-token: write | ||
|
||
on: [push, workflow_dispatch] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: debug root | ||
run: ls | ||
- name: debug subfolder | ||
run: cd src && ls | ||
- name: Build | ||
run: npm run build | ||
- name: 'Run Compliance State' | ||
uses: ./ | ||
with: | ||
cydigConfigPath: ${{ github.workspace }}/src/cydigconfig.json | ||
repo-token: ${{ secrets.MY_GITHUB_PAT}} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,3 +102,6 @@ __tests__/runner/* | |
.idea | ||
.vscode | ||
*.code-workspace | ||
|
||
#dist | ||
ResultsFile.xml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
dist/ | ||
node_modules/ | ||
coverage/ | ||
coverage/ | ||
README.md |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# How to install linting and format | ||
|
||
1. Run the following commands (be in the root, if you don't have a package.json there, run npm init first to create one): | ||
|
||
```yaml | ||
npm install eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin husky prettier --save-dev | ||
npm pkg set scripts.prepare="husky install" | ||
npm run prepare | ||
``` | ||
|
||
2. Copy files: .eslintrc.json, .prettierignore, .prettierrc and .husky/pre-commit | ||
|
||
3. Add following to script section in package.json: | ||
|
||
```json | ||
"lint": "eslint . --ext .ts", | ||
"lint:fix": "eslint . --fix --ext .ts", | ||
"format:write": "npx prettier -w .", | ||
"format:check": "npx prettier -c .", | ||
``` | ||
|
||
4. Make a commit. You should see that your files are being checked for rule breaks. If it does not work and you are using a Mac, run following command and try a new commit: | ||
|
||
```yaml | ||
chmod ug+x .husky/* | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,51 @@ | ||
# CyDig Pipeline Tasks | ||
# CyDig Compliance Action | ||
|
||
This repository contains a action with compliance controls. | ||
|
||
## Compliance Controls | ||
|
||
The compliance controls that are currently available are listed below. | ||
|
||
* Number of reviewers on a pull request | ||
* Date of latest threat modeling | ||
* Date of latest penetration test | ||
|
||
## Development on already existing or new control. | ||
|
||
1. To start development, create a branch named **feature/your-branch-name**. | ||
|
||
2. Run the command below from the root. | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
By first running this command in the root you get the linting and format rules downloaded. So, every time you make a commit, a pre-hook will run to validate the rules. If there are any violation you will se an error or a warning in the terminal. Read more [here](/LinitingAndFormat.md). To fix format warnings run the following command from the **root**: | ||
|
||
```bash | ||
npm run format:write | ||
``` | ||
|
||
3. If you are developing a new control, create a new folder for your control in the ```src``` folder. | ||
4. Start developing. To compile your code, run the following command: | ||
|
||
```bash | ||
npm run build | ||
``` | ||
|
||
5. To run the tests, run the following command: | ||
|
||
```bash | ||
npm run test | ||
``` | ||
|
||
To generated test results in a XML-file, run the following command: | ||
|
||
```bash | ||
npm run testScript | ||
``` | ||
|
||
If you don't have at least 1 test in the ```test``` folder, the workflow won't work. | ||
6. If necessary, add input parameter in ```action.yml```, if it is needed for the control. | ||
7. When pushing the code the repository the workflow will build and push your code to the repository. | ||
|
||
This repository contains compliance tasks. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.