Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please merge #28

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/Securin-aspm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
name: Securin-ASPM
on:
pull_request:
branches:
- dev
workflow_dispatch:
inputs:
logLevel:
description: Log level
jobs:
scanning:
env:
APP_ID: 28aeadc982fa09de30ae02bf73cf14f4c434b31f4eb46baf6e4c3c20adc1e13d
BRANCH_NAME: dev
SCAN_ID: e2c13ef32b70667dbe1e50ed7d526df7ff3cd5abe81c6dbf15ff437681b6d52a
REQ_URL_MAP: "${{toJSON('{\"SL_RESULT_API_HOST\":\"https://slresultapi.qa.securin.io/resultapi\"\
,\"SL_RESULTPARSER_API_HOST\":\"https://slresultparserapi.qa.securin.io/resultparserapi\"\
}')}}"
steps:
- name: Retrieve Token Info
id: auth_token
run: "respJson=$(curl --location --request GET 'https://slresultapi.qa.securin.io/resultapi/aws/ecr/token'\
\ --header 'X-ASPM-Auth-Key: ${{secrets.ORG_API_KEY}}' --data-raw ' ' )\
\ \necho \"authTokenJson=$respJson\" >> $GITHUB_OUTPUT"
- uses: actions/checkout@v3
- name: Scan Initiated
id: sec_scan_init
run: "usrVal=$(echo '${{fromJson(steps.auth_token.outputs.authTokenJson).user}}'\
\ | openssl enc -aes-256-cbc -d -a -K ${{secrets.ENC_KEY}} -iv ${{secrets.ENC_IV}}\
\ ) \nusrPassword=$(echo '${{fromJson(steps.auth_token.outputs.authTokenJson).password}}'\
\ | openssl enc -aes-256-cbc -d -base64 -A -K ${{secrets.ENC_KEY}} -iv ${{secrets.ENC_IV}}\
\ ) \nusrPrxyUrl=$(echo '${{fromJson(steps.auth_token.outputs.authTokenJson).proxyUrl}}'\
\ | openssl enc -aes-256-cbc -d -a -K ${{secrets.ENC_KEY}} -iv ${{secrets.ENC_IV}}\
\ ) \nusrImgTag=$(echo '${{fromJson(steps.auth_token.outputs.authTokenJson).imageTag}}'\
\ | openssl enc -aes-256-cbc -d -a -K ${{secrets.ENC_KEY}} -iv ${{secrets.ENC_IV}}\
\ ) \ndocker login --username $usrVal --password $usrPassword $usrPrxyUrl\
\ \ndocker pull -q $usrImgTag \ndocker run -v ${{github.workspace}}:/src \
\ --volume ${{github.workspace}}:/workdir -v /var/run/docker.sock:/var/run/docker.sock\
\ $usrImgTag -api_key ${{secrets.ORG_API_KEY}} -wrkspc_id ${{secrets.WORKSPACE_ID}}\
\ -app_id ${{ env.APP_ID }} -scan_id ${{ env.SCAN_ID }} -branch_name ${{ env.BRANCH_NAME\
\ }} -req_url_map ${{ env.REQ_URL_MAP }} -tool_name github event:${{ github.event_name\
\ }} pr_number:${{ github.event.number }} -upload_log true"
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: "${{github.workspace}}/results/result.sarif"
if: hashFiles('**/result.sarif') !=''
- name: Evaluate build status
run: "cat ${{github.workspace}}/results/status.txt\nexit 1\n"
if: hashFiles('**/status.txt') !=''
permissions:
security-events: write
runs-on: ubuntu-latest
52 changes: 52 additions & 0 deletions .github/workflows/ShiftLeft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
name: Shiftleft Scan
on:
pull_request:
branches:
- dev
workflow_dispatch:
inputs:
logLevel:
description: Log level
jobs:
scanning:
env:
APP_ID: 4849d84793b2d0ccf7bf24f16810328564a1b1b9181b94de9f38942f1de3ddc8
BRANCH_NAME: dev
SCAN_ID: 2961c005f1ff5f58a800c47bb11e69871af3d2ec3cb3b55c39941c5f14e3c89b
REQ_URL_MAP: "${{toJSON('{\"SL_RESULT_API_HOST\":\"https://slresultapi.qa.securin.io/resultapi\"\
,\"SL_RESULTPARSER_API_HOST\":\"https://slresultparserapi.qa.securin.io/resultparserapi\"\
}')}}"
steps:
- name: Retrieve Token Info
id: auth_token
run: "respJson=$(curl --location --request GET 'https://slresultapi.qa.securin.io/resultapi/aws/ecr/token'\
\ --header 'Authorization: Bearer ${{secrets.CLI_ACCESS_TOKEN}}' --data-raw\
\ ' ' )\necho \"::set-output name=authTokenJson::$respJson\""
- uses: actions/checkout@v2
- name: Scan Initiated
id: sec_scan_init
run: "usrVal=$(echo '${{fromJson(steps.auth_token.outputs.authTokenJson).user}}'\
\ | openssl enc -aes-256-cbc -d -a -K ${{secrets.ENC_KEY}} -iv ${{secrets.ENC_IV}}\
\ ) \nusrPassword=$(echo '${{fromJson(steps.auth_token.outputs.authTokenJson).password}}'\
\ | openssl enc -aes-256-cbc -d -base64 -A -K ${{secrets.ENC_KEY}} -iv ${{secrets.ENC_IV}}\
\ ) \nusrPrxyUrl=$(echo '${{fromJson(steps.auth_token.outputs.authTokenJson).proxyUrl}}'\
\ | openssl enc -aes-256-cbc -d -a -K ${{secrets.ENC_KEY}} -iv ${{secrets.ENC_IV}}\
\ ) \nusrImgTag=$(echo '${{fromJson(steps.auth_token.outputs.authTokenJson).imageTag}}'\
\ | openssl enc -aes-256-cbc -d -a -K ${{secrets.ENC_KEY}} -iv ${{secrets.ENC_IV}}\
\ ) \ndocker login --username $usrVal --password $usrPassword $usrPrxyUrl\
\ \ndocker pull -q $usrImgTag \ndocker run -v ${{github.workspace}}:/src \
\ --volume ${{github.workspace}}:/workdir -v /var/run/docker.sock:/var/run/docker.sock\
\ $usrImgTag -access_tkn ${{secrets.CLI_ACCESS_TOKEN}} -app_id ${{ env.APP_ID\
\ }} -scan_id ${{ env.SCAN_ID }} -branch_name ${{ env.BRANCH_NAME }} -req_url_map\
\ ${{ env.REQ_URL_MAP }} -tool_name github event:${{ github.event_name }}\
\ pr_number:${{ github.event.number }}"
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: "${{github.workspace}}/results/result.sarif"
if: hashFiles('**/result.sarif') !=''
- name: Evaluate build status
run: "cat ${{github.workspace}}/results/status.txt\nexit 1\n"
if: hashFiles('**/status.txt') !=''
runs-on: ubuntu-latest
Loading