forked from IGDEXE/NodeGoat-JS
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Veracode_Set_Policy | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
Veracode: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download Veracode Wrapper | ||
run: | | ||
curl -o veracode-wrapper.jar https://repo1.maven.org/maven2/com/veracode/vosp/api/wrappers/vosp-api-wrappers-java/23.4.11.2/vosp-api-wrappers-java-23.4.11.2.jar | ||
- name: Veracode - Set Policy | ||
env: | ||
VID: ${{ secrets.VeracodeID }} # Lembrar de criar as credenciais no Secrets | ||
VKEY: ${{ secrets.VeracodeKey }} | ||
veracodeAppProfile: Github - ${{ github.repository }} | ||
veracodePolicy: ${{ secrets.veracodePolicy }} | ||
run: | | ||
# Obtem as informacoes do projeto | ||
INFO=$(java -jar veracode-wrapper.jar -vid $VID -vkey $VKEY -action GetAppList) | ||
appID=$(echo "$INFO" | grep -oP '(?<=app_id=")[^"]+(?=" app_name="'$veracodeAppProfile'")') | ||
# Verifica se o appID foi extraido corretamente | ||
if [ -n "$appID" ]; then | ||
# Faz a edicao | ||
java -jar veracode-wrapper.jar -vid $VID -vkey $VKEY -action updateapp -appid $appID -policy "$veracodePolicy" | ||
echo "Add $veracodeAppProfile (ID: $appID) in Policy $veracodePolicy" | ||
else | ||
echo "App ID não encontrado para o perfil $veracodeAppProfile" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"veracode-scan.SCA Features.policy": true | ||
"veracode-scan.SCA Features.policy": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters