Skip to content

Commit

Permalink
chore: Developer updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rsenden committed Sep 25, 2023
1 parent b915499 commit 2281e53
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 10 deletions.
1 change: 0 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

(cd run && NODE_OPTIONS=--openssl-legacy-provider npm run build && git add dist/)
(cd setup && NODE_OPTIONS=--openssl-legacy-provider npm run build && git add dist/)
11 changes: 9 additions & 2 deletions configure.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#! /bin/bash
(cd run && npm install)
(cd setup && npm install)

cat << 'EOF' > .husky/pre-commit
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
EOF
for dir in run setup; do
(cd $dir && npm install)
echo "(cd "$dir" && NODE_OPTIONS=--openssl-legacy-provider npm run build && git add dist/)" >> .husky/pre-commit
done
git config --local core.hooksPath=.husky
4 changes: 2 additions & 2 deletions developers.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Information for developers

## Husky
After cloning this repository, please run ./configure.sh to install npm modules and configure git hooks.
## Repository initialization
After cloning this repository, please run ./configure.sh to install npm modules and configure git hooks. When adding a new NodeJS-based action, you'll need to update `<repo-root>/configure.sh` to add the action directory to the for-loop.
4 changes: 2 additions & 2 deletions fod-export/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Perform SAST scan'
description: 'Perform a SAST scan on Fortify on Demand'
name: 'Export FoD vulnerability data to GitHub'
description: 'Export FoD vulnerability data to GitHub'
author: 'Fortify'
runs:
using: composite
Expand Down
17 changes: 17 additions & 0 deletions fod-logout/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: 'Run "fcli fod session login" command'
description: 'Run "fcli fod session login" command based on environment variables'
author: 'Fortify'
runs:
using: composite
steps:
- uses: fortify-ps/github-action/setup@main
with:
export-path: false
fcli: action-default
- uses: fortify-ps/github-action/run@main
with:
cmd: '"${FCLI_CMD}" fod session logout'
branding:
icon: 'shield'
color: 'blue'

4 changes: 1 addition & 3 deletions fod-sast-scan/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ runs:
if: env.DO_WAIT == 'true' || env.DO_EXPORT == 'true'
with:
cmd: '"${FCLI_CMD}" fod scan wait-for ::fod_scan::'
- uses: fortify-ps/github-action/run@main
with:
cmd: '"${FCLI_CMD}" fod session logout'
- uses: fortify-ps/github-action/fod-logout@main
- if: env.DO_EXPORT == 'true'
uses: fortify-ps/github-action/fod-export@main

Expand Down

0 comments on commit 2281e53

Please sign in to comment.