Skip to content

Commit 68026c2

Browse files
committed
Added Erlang support
Signed-off-by: sandhi <sagarwal@progress.com>
1 parent 3b59424 commit 68026c2

File tree

2 files changed

+59
-3
lines changed

2 files changed

+59
-3
lines changed

.github/workflows/ci-main-pull-request.yml

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,6 +1023,55 @@ jobs:
10231023
uses: actions/checkout@v6
10241024
with:
10251025
fetch-depth: 0
1026+
1027+
- name: Configure git for private Go modules
1028+
env:
1029+
GOPRIVATE: ${{ inputs.go-private-modules }}
1030+
run: git config --global url."https://${{ secrets.GH_TOKEN }}@github.com/".insteadOf "https://github.com/"
1031+
1032+
- name: Install build tools for Erlang
1033+
if: inputs.language == 'erlang'
1034+
run: |
1035+
sudo apt-get update
1036+
sudo apt-get install -y build-essential
1037+
1038+
- name: Set up Erlang/OTP and rebar3
1039+
if: inputs.language == 'erlang'
1040+
uses: erlef/setup-beam@v1
1041+
with:
1042+
otp-version: '25.3.2.16'
1043+
rebar3-version: '3.22.0'
1044+
1045+
- name: Set up Ruby
1046+
if: inputs.language == 'ruby'
1047+
uses: ruby/setup-ruby@v1
1048+
with:
1049+
ruby-version: '3.0'
1050+
bundler-cache: false
1051+
1052+
- name: Create bundle stub for Erlang SAST scan
1053+
if: inputs.language == 'erlang'
1054+
working-directory: ${{ github.workspace }}
1055+
run: |
1056+
# Polaris scans Erlang source code for SAST - Ruby gems not needed
1057+
# System ruby-dev from apt provides Ruby runtime (already installed)
1058+
# Create bundle stub to skip gem installation during Polaris scan
1059+
echo "Creating bundle stub to bypass Ruby gem installation"
1060+
1061+
# Create no-op bundle script
1062+
mkdir -p "$HOME/.polaris-stubs"
1063+
cat > "$HOME/.polaris-stubs/bundle" << 'EOF'
1064+
#!/bin/bash
1065+
# Stub: skips gem installation during SAST scan
1066+
echo "[STUB] Skipping bundle $@ - not needed for Erlang SAST"
1067+
exit 0
1068+
EOF
1069+
chmod +x "$HOME/.polaris-stubs/bundle"
1070+
1071+
# Prepend to PATH so stub is found before any system bundler
1072+
echo "$HOME/.polaris-stubs" >> $GITHUB_PATH
1073+
1074+
echo "Bundle stub created and added to PATH"
10261075
10271076
- name: Starting Black Duck Polaris scan
10281077
run: |
@@ -1332,7 +1381,7 @@ jobs:
13321381
name: 'Generating SBOM'
13331382
# Create software bill-of-materials (SBOM) using SPDX format
13341383
if: ${{ inputs.generate-sbom == true }}
1335-
uses: chef/common-github-actions/.github/workflows/sbom.yml@main
1384+
uses: chef/common-github-actions/.github/workflows/sbom.yml@sandhi/fix-blackduc-sca
13361385
needs: checkout # TODO: fix set-application-version
13371386
secrets: inherit
13381387
with:

.github/workflows/sbom.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,19 @@ jobs:
203203
uses: actions/checkout@v6
204204

205205
- name: Set up Ruby and run bundle install
206-
if: ${{ inputs.language == 'ruby' }} # only run for Ruby projects where we need to generate Gemfile.lock at runtime, inputs.run-bundle-install == true
206+
if: inputs.language == 'ruby'
207207
uses: ruby/setup-ruby@v1
208208
with:
209-
ruby-version: '3.4'
209+
ruby-version: '3.4.2'
210210
bundler-cache: true
211211

212+
- name: Set up Erlang/OTP and rebar3
213+
if: inputs.language == 'erlang'
214+
uses: erlef/setup-beam@v1
215+
with:
216+
otp-version: '25.3.2.16'
217+
rebar3-version: '3.22.0'
218+
212219
- name: Configure git for private Go modules
213220
if : ${{ inputs.go-private-modules != '' }}
214221
env:

0 commit comments

Comments
 (0)