Configuration of Checkmarx (BYOR).
SAFE can integrate with Checkmarx by sending the vulnerabilities to the risk managament page.
Enabling Checkmarx
To enable the sending of scan results from SAFE to Checkmarx, add "checkmarx" to the list of outputs in the config.json
{
"output": ["stdio", "checkmarx", "file"],
"version": "1.1",
"project": {
"name": "appname",
"type": "beam",
"apps": [
{
"name": "appname",
"additional_includes": []
},
{
"name": "appname2",
"additional_includes": []
}
],
"paths": [
"_build/prod/lib"
]
}
}
Define the environment variables for Checkmarx API
In your CI/CD pipeline, define a job specifically for SAFE (e.g., security-check). For installation instructions see the Download page.
These are the necessary environment variables to allow results being sent to Checkmarx.
env:
SAFE_LICENSE: ${{ secrets.SAFE_LICENSE }}
CHECKMARX_API_KEY: ${{ secrets.CHECKMARX_API_KEY }}
CHECKMARX_PROJECT_ID: ${{ secrets.CHECKMARX_PROJECT_ID }}
CHECKMARX_TENANT_ACCOUNT_NAME: ${{ secrets.CHECKMARX_TENANT_ACCOUNT_NAME }}
CHECKMARX_REGION: ${{ secrets.CHECKMARX_REGION }}
Github actions
name: Erlang CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: '26'
rebar3-version: '3.24.0'
- name: Compile
run: rebar3 compile
- name: Upload _build directory
uses: actions/upload-artifact@v4
with:
name: build-artifact
path: _build
security-check:
runs-on: ubuntu-latest
needs: build
container:
image: erlangsolutions/safe:1.1.0-otp-26
steps:
- uses: actions/checkout@v4
- name: Download _build directory
uses: actions/download-artifact@v4
with:
name: build-artifact
path: _build
- run: safe start
env:
SAFE_LICENSE: ${{ secrets.SAFE_LICENSE }}
CHECKMARX_API_KEY: ${{ secrets.CHECKMARX_API_KEY }}
CHECKMARX_PROJECT_ID: ${{ secrets.CHECKMARX_PROJECT_ID }}
CHECKMARX_TENANT_ACCOUNT_NAME: ${{ secrets.CHECKMARX_TENANT_ACCOUNT_NAME }}
CHECKMARX_REGION: ${{ secrets.CHECKMARX_REGION }}
SAFE_LICENSE: ${{ secrets.SAFE_LICENSE }}
- name: Persist results
uses: actions/upload-artifact@v4
with:
name: project-safe-results
path: _results/<<Project_Name>>.safe
The value for CHECKMARX_REGION can be one of these:
us,
us2,
eu,
eu2,
deu,
anz,
ind,
sng,
uae
The CHECKMARX_TENANT_ACCOUNT_NAME can be found in the Account Settings screen in the web portal.
The CHECKMARX_PROJECT_ID can be found in the project page.

After the CI run, the results are sent to Checkmarx and will be created in the Risk Management page.

And the details for each vulnerability is shown.
