Skip to content

PR Code Scan

PR Code Scan #40

Workflow file for this run

name: PR Code Scan
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- master
- main
- test
workflow_dispatch:
jobs:
scan_pr_code:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository code
- name: Checkout Repository
uses: actions/checkout@v4
# Step 2: Install Email Dependencies
- name: Install Email Dependencies
env:
ACCOUNT: ${{secrets.ACCOUNT}}
HOST: ${{secrets.HOST}}
PORT: ${{secrets.PORT}}
SENDER_EMAIL: $ {{secrets.SENDER_EMAIL}}
SENDER_EMAIL_USERNAME: ${{secrets.SENDER_EMAIL_USERNAME}}
SENDER_EMAIL_PASSWORD: ${{SENDER_EMAIL_PASSWORD}}

Check failure on line 29 in .github/workflows/linuxtest.yml

View workflow run for this annotation

GitHub Actions / PR Code Scan

Invalid workflow file

The workflow is not valid. .github/workflows/linuxtest.yml (Line: 29, Col: 34): Unrecognized named-value: 'SENDER_EMAIL_PASSWORD'. Located at position 1 within expression: SENDER_EMAIL_PASSWORD .github/workflows/linuxtest.yml (Line: 30, Col: 28): Unrecognized named-value: 'ACCOUNT_DEFAULT'. Located at position 1 within expression: ACCOUNT_DEFAULT
ACCOUNT_DEFAULT: ${{ACCOUNT_DEFAULT}}
RECIPIENT_EMAIL: ${{secrets.RECIPIENT_EMAIL}}
run: |
sudo apt-get update
sudo apt-get install -y msmtp mutt
# Step 3: Set up Checkmarx One CLI
- name: Set up Checkmarx One CLI
env:
CX_API_KEY: ${{secrets.Cx_One_API_Key}}
run: |
CX_VERSION="2.3.21"
wget "https://github.com/Checkmarx/ast-cli/releases/download/${CX_VERSION}/ast-cli_${CX_VERSION}_linux_x64.tar.gz"
tar -xvzf ast-cli_${CX_VERSION}_linux_x64.tar.gz
chmod +x cx
sudo mv cx /usr/local/bin/
# Step 4: Make your scan script executable
- name: Make Script Executable
run: chmod +x git-secret-scanner.sh
# Step 5: Run the Scan Script
- name: Run Scan Script
run: bash ./git-secret-scanner.sh "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git" "${{ github.head_ref || github.ref_name }}"
# Step 6: Report the results
- name: Report Scan Results
run: |
echo "Pull Request code scan completed. Check workflow logs for details."