Skip to content

Commit 6c89f05

Browse files
committed
fixed the blackduck test
Signed-off-by: vviveksharma <visharma@progress.com>
1 parent 571811b commit 6c89f05

2 files changed

Lines changed: 19 additions & 47 deletions

File tree

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

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -756,53 +756,6 @@ jobs:
756756

757757
# https://go.googlesource.com/vuln - govulncheck is same as BlackDuck SCA backend, redundant to add it here
758758

759-
- name: Checkout repository for PL/pgSQL checks
760-
if: inputs.language == 'plpgsql'
761-
uses: actions/checkout@v6
762-
with:
763-
fetch-depth: 0
764-
- name: PL/pgSQL language checks - ShellCheck
765-
if: inputs.language == 'plpgsql'
766-
run: |
767-
echo "Running ShellCheck on shell scripts"
768-
sudo apt-get update && sudo apt-get install -y shellcheck
769-
find . -name '*.sh' -not -path './.git/*' -print0 | xargs -0 shellcheck --severity=warning || true
770-
- name: PL/pgSQL language checks - SQL lint
771-
if: inputs.language == 'plpgsql'
772-
run: |
773-
echo "Running SQL syntax validation on PL/pgSQL files"
774-
# Basic SQL syntax check: filter comments and validate non-empty SQL statements
775-
ERRORS=0
776-
for f in $(find . -name '*.sql' -not -path './.git/*' -not -path '*/revert/*'); do
777-
# Strip comments and check for basic syntax issues
778-
perl -e '
779-
local $/;
780-
$_ = <>;
781-
s/--.*$//gm;
782-
s!/\*.*?\*/!!gs;
783-
s/^\s+//; s/\s+$//;
784-
exit 0 if /\A\s*\z/;
785-
exit 0;
786-
' "$f"
787-
if [ $? -ne 0 ]; then
788-
echo "⚠️ Syntax issue in: $f"
789-
ERRORS=$((ERRORS + 1))
790-
fi
791-
done
792-
echo "SQL validation complete. Issues found: $ERRORS"
793-
- name: PL/pgSQL language checks - Dockerfile lint
794-
if: inputs.language == 'plpgsql'
795-
run: |
796-
echo "Validating Dockerfiles"
797-
for df in $(find . -name 'Dockerfile' -not -path './.git/*'); do
798-
echo "Checking $df"
799-
# Basic Dockerfile validation - check for FROM instruction
800-
if ! grep -q '^FROM' "$df"; then
801-
echo "⚠️ Missing FROM instruction in $df"
802-
else
803-
echo "✅ $df is valid"
804-
fi
805-
done
806759
language-agnostic-checks:
807760
name: 'Language-agnostic pre-compilation steps'
808761
if: inputs.perform-language-linting

.github/workflows/sbom.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,25 @@ jobs:
257257
otp-version: '25.3.2.16'
258258
rebar3-version: '3.22.0'
259259

260+
- name: Set up Ruby for PL/pgSQL projects
261+
if: inputs.language == 'plpgsql'
262+
uses: ruby/setup-ruby@v1
263+
with:
264+
ruby-version: '3.4.2'
265+
bundler-cache: false
266+
- name: Generate Gemfile.lock for PL/pgSQL sub-components
267+
if: inputs.language == 'plpgsql'
268+
continue-on-error: true
269+
run: |
270+
echo "Scanning for Gemfile in PL/pgSQL project sub-directories"
271+
for dir in $(find . -name 'Gemfile' -not -path './.git/*' -exec dirname {} \;); do
272+
echo "Found Gemfile in $dir"
273+
if [ ! -f "$dir/Gemfile.lock" ]; then
274+
echo "Generating Gemfile.lock in $dir"
275+
(cd "$dir" && bundle install)
276+
fi
277+
done
278+
260279
- name: Configure git for private Go modules
261280
if : ${{ inputs.go-private-modules != '' }}
262281
env:

0 commit comments

Comments
 (0)