diff --git a/.github/workflows/trivy-check.yml b/.github/workflows/trivy-check.yml deleted file mode 100644 index eeb7045..0000000 --- a/.github/workflows/trivy-check.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Trivy Scan - -on: - push: - branches: - - main - - 'release-1*' - - develop - - '1.2.*' - - master - - test - - MOSIP-35889 - pull_request: - branches: - - main - - 'release-1*' - - develop - - '1.2.*' - - master - - test - - MOSIP-35889 - - MOSIP-35987 - -jobs: - trivy-scan: - runs-on: ubuntu-latest - env: - SERVICE_NAME: partner-onboarder - VERSION: ${{ github.event.number || 'latest' }} - SERVICE_LOCATION: '.' # Adjust if needed - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Build Docker image - run: | - cd "${{ env.SERVICE_LOCATION }}" - docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }}:${{ env.VERSION }} - - - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@0.20.0 - with: - image-ref: '${{ env.SERVICE_NAME }}:${{ env.VERSION }}' - format: 'sarif' - output: 'trivy-results.sarif' - severity: 'HIGH,CRITICAL' - ignore-unfixed: true - exit-code: 1 # Fail the job if vulnerabilities found - - - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v2 - with: - sarif_file: 'trivy-results.sarif' - if: always() # Ensure this step runs even if the previous step fails diff --git a/onboarding.postman_collection.json b/onboarding.postman_collection.json index 674db6f..a001526 100644 --- a/onboarding.postman_collection.json +++ b/onboarding.postman_collection.json @@ -1,6 +1,6 @@ { "info": { - "_postman_id": "34cbd0af-238b-49a8-b10f-dcfd373b5042", + "_postman_id": "863ca8cb-6596-4c39-b0b2-e2ae80d5301d", "name": "onboarding Copy", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "12620596" @@ -319,8 +319,9 @@ "listen": "prerequest", "script": { "exec": [ - "if (pm.environment.get(\"mosip-id\") == 'false' ){\r", - " pm.execution.skipRequest()\r", + "if (pm.environment.get(\"mosip-id\") == 'false' ){console.log(\"This request is skipped as eSignet is not deployed against MosipID\");\r", + "\r", + "    pm.execution.skipRequest()\r", "}" ], "type": "text/javascript", @@ -391,8 +392,9 @@ "listen": "prerequest", "script": { "exec": [ - "if (pm.environment.get(\"mosip-id\") == 'false' ){\r", - " pm.execution.skipRequest()\r", + "if (pm.environment.get(\"mosip-id\") == 'false' ){console.log(\"This request is skipped as eSignet is not deployed against MosipID\");\r", + "\r", + "    pm.execution.skipRequest()\r", "}" ], "type": "text/javascript", @@ -458,8 +460,9 @@ "const policydata = pm.iterationData.toObject();\r", "console.log(JSON.stringify(policydata));\r", "pm.environment.set('policy-data', JSON.stringify(policydata));\r", - "if (pm.environment.get(\"mosip-id\") == 'false' ){\r", - " pm.execution.skipRequest()\r", + "if (pm.environment.get(\"mosip-id\") == 'false' ){console.log(\"This request is skipped as eSignet is not deployed against MosipID\");\r", + "\r", + "    pm.execution.skipRequest()\r", "}\r", "" ], @@ -538,8 +541,9 @@ "listen": "prerequest", "script": { "exec": [ - "if (pm.environment.get(\"mosip-id\") == 'false' ){\r", - " pm.execution.skipRequest()\r", + "if (pm.environment.get(\"mosip-id\") == 'false' ){console.log(\"This request is skipped as eSignet is not deployed against MosipID\");\r", + "\r", + "    pm.execution.skipRequest()\r", "}" ], "type": "text/javascript", @@ -600,8 +604,9 @@ "listen": "prerequest", "script": { "exec": [ - "if (pm.environment.get(\"mosip-id\") == 'false' ){\r", - " pm.execution.skipRequest()\r", + "if (pm.environment.get(\"mosip-id\") == 'false' ){console.log(\"This request is skipped as eSignet is not deployed against MosipID\");\r", + "\r", + "    pm.execution.skipRequest()\r", "}" ], "type": "text/javascript", @@ -658,8 +663,9 @@ "listen": "prerequest", "script": { "exec": [ - "if (pm.environment.get(\"mosip-id\") == 'false' ){\r", - " pm.execution.skipRequest()\r", + "if (pm.environment.get(\"mosip-id\") == 'false' ){console.log(\"This request is skipped as eSignet is not deployed against MosipID\");\r", + "\r", + "    pm.execution.skipRequest()\r", "}" ], "type": "text/javascript", @@ -759,16 +765,18 @@ " pm.expect(pm.response.text()).to.include(\"Clientid and Token combination had been validated successfully\");\r", "});" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } }, { "listen": "prerequest", "script": { "exec": [ - "pm.environment.set('request-time', (new Date()).toISOString())" + "" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -810,16 +818,18 @@ " pm.expect(pm.response.text()).to.include(\"Clientid and Token combination had been validated successfully\");\r", "});" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } }, { "listen": "prerequest", "script": { "exec": [ - "pm.environment.set('request-time', (new Date()).toISOString())" + "" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -1379,8 +1389,9 @@ "listen": "prerequest", "script": { "exec": [ - "if (pm.environment.get(\"mosip-id\") == 'false' ){\r", - " pm.execution.skipRequest()\r", + "if (pm.environment.get(\"mosip-id\") == 'false' ){console.log(\"This request is skipped as eSignet is not deployed against MosipID\");\r", + "\r", + "    pm.execution.skipRequest()\r", "}" ], "type": "text/javascript", @@ -1554,8 +1565,9 @@ "listen": "prerequest", "script": { "exec": [ - "if (pm.environment.get(\"mosip-id\") == 'false' ){\r", - " pm.execution.skipRequest()\r", + "if (pm.environment.get(\"mosip-id\") == 'false' ){console.log(\"This request is skipped as eSignet is not deployed against MosipID\");\r", + "\r", + "    pm.execution.skipRequest()\r", "}" ], "type": "text/javascript", @@ -1867,8 +1879,9 @@ "listen": "prerequest", "script": { "exec": [ - "if (pm.environment.get(\"mosip-id\") == 'false' ){\r", - " pm.execution.skipRequest()\r", + "if (pm.environment.get(\"mosip-id\") == 'false' ){console.log(\"This request is skipped as eSignet is not deployed against MosipID\");\r", + "\r", + "    pm.execution.skipRequest()\r", "}" ], "type": "text/javascript", @@ -2076,8 +2089,9 @@ "listen": "prerequest", "script": { "exec": [ - "if (pm.environment.get(\"mosip-id\") == 'false' ){\r", - " pm.execution.skipRequest()\r", + "if (pm.environment.get(\"mosip-id\") == 'false' ){console.log(\"This request is skipped as eSignet is not deployed against MosipID\");\r", + "\r", + "    pm.execution.skipRequest()\r", "}" ], "type": "text/javascript", @@ -2262,8 +2276,9 @@ "listen": "prerequest", "script": { "exec": [ - "if (pm.environment.get(\"mosip-id\") == 'false' ){\r", - " pm.execution.skipRequest()\r", + "if (pm.environment.get(\"mosip-id\") == 'false' ){console.log(\"This request is skipped as eSignet is not deployed against MosipID\");\r", + "\r", + "    pm.execution.skipRequest()\r", "}" ], "type": "text/javascript", @@ -2601,8 +2616,9 @@ " console.error(\"Environment variable 'redirect-uris' is not defined.\");\r", " pm.environment.set(\"redirect_uris_array\", \"[]\");\r", "}\r", - "if (pm.environment.get(\"mosip-id\") == 'false' ){\r", - " pm.execution.skipRequest()\r", + "if (pm.environment.get(\"mosip-id\") == 'false' ){console.log(\"This request is skipped as eSignet is not deployed against MosipID\");\r", + "\r", + "    pm.execution.skipRequest()\r", "}\r", "" ],