From 996691a3f32efdc483b6833d88614089a3e8c475 Mon Sep 17 00:00:00 2001 From: mfe2650 <163406658+mfe2650@users.noreply.github.com> Date: Tue, 16 Dec 2025 16:57:11 +0900 Subject: [PATCH 1/2] Add CI workflow for Polaris security scanning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 変数セットしてないから失敗するはず --- .github/workflows/main.yml | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..c864a515 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,48 @@ +name: CI-Polaris-Basic +on: + push: + branches: [main, master, develop, stage, release] + pull_request: + branches: [main, master, develop, stage, release] + workflow_dispatch: + + +jobs: + build: + runs-on: [ubuntu-latest] + steps: + - name: Checkout Source + uses: actions/checkout@v4 + - name: Polaris Scan + id: polaris-scan + uses: blackduck-inc/black-duck-security-scan@v2 + with: + ### SCANNING: Required fields + polaris_server_url: ${{ vars.POLARIS_SERVER_URL }} + polaris_access_token: ${{ secrets.POLARIS_ACCESS_TOKEN }} + polaris_assessment_types: "SCA,SAST" + + ### SCANNING: Optional fields + polaris_application_name: ${{ vars.POLARIS_APPLICATION_NAME }} + polaris_project_name: ${{ vars.POLARIS_PROJECT_NAME_NAME }} + + ### PULL REQUEST COMMENTS: Uncomment below to enable + # polaris_prComment_enabled: true + # github_token: ${{ secrets.GITHUB_TOKEN }} # Required when PR comments is enabled + + ### SARIF report parameters + #polaris_reports_sarif_create: true + #polaris_upload_sarif_report: true + + ### Signature scan + #polaris_test_sca_type: "SCA-SIGNATURE" + + ### Mark build status if policy violating issues are found + # mark_build_status: 'success' + + ### Uncomment below configuration to add custom logic based on return status + # - name: cmdLine + # id: cmdLine + # run: | + # EXIT_CODE=${{ steps.polaris-scan.outputs.status }} + # echo "Polaris Scan exit status - $EXIT_CODE" From 09aff88de62ae4f0e691cec747f82de5d3ded9d6 Mon Sep 17 00:00:00 2001 From: mfe2650 <163406658+mfe2650@users.noreply.github.com> Date: Tue, 16 Dec 2025 17:09:20 +0900 Subject: [PATCH 2/2] Fix variable name for polaris_project_name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit これで動くはず。 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c864a515..51a15685 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: ### SCANNING: Optional fields polaris_application_name: ${{ vars.POLARIS_APPLICATION_NAME }} - polaris_project_name: ${{ vars.POLARIS_PROJECT_NAME_NAME }} + polaris_project_name: ${{ vars.POLARIS_PROJECT_NAME }} ### PULL REQUEST COMMENTS: Uncomment below to enable # polaris_prComment_enabled: true