Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
ae3584d
feat: add Docker validation step and pre-pull Edgescan image in workflow
nnoce14 Jan 5, 2026
cc7e571
feat: update Snyk configuration and add Edgescan run script in packag…
nnoce14 Jan 5, 2026
014b6eb
feat: update Snyk expiration date, reorder credential groups, and add…
nnoce14 Jan 5, 2026
85ef11d
feat: enhance EdgeScan script to validate both ES_API_TOKEN and ES_AS…
nnoce14 Jan 6, 2026
5c9ede5
feat: update EdgeScan integration to use the latest Docker image tag …
nnoce14 Jan 6, 2026
b31c002
feat: improve EdgeScan script error handling for ES_API_TOKEN and ES_…
nnoce14 Jan 6, 2026
80f103e
chore: temporarily remove build/deploy conditions to test edgescan st…
nnoce14 Jan 6, 2026
6ac8880
fix: quote environment variable assignments in EdgeScan script for pr…
nnoce14 Jan 6, 2026
fbe0281
fix: improve EdgeScan script error message clarity and ensure Docker …
nnoce14 Jan 6, 2026
04f244d
fix: correct syntax error in EdgeScan script condition for ES_API_TOK…
nnoce14 Jan 6, 2026
f1dda61
feat: enhance EdgeScan CI/CD integration with caching and improved im…
nnoce14 Jan 6, 2026
e1bd717
fix: add --start-scan option to EdgeScan run command for immediate sc…
nnoce14 Jan 6, 2026
b47ce2b
fix: update build conditions to exclude Pull Requests for artifact pr…
nnoce14 Jan 6, 2026
8e06939
fix: update caching key to include monthly refresh for EdgeScan Docke…
nnoce14 Jan 6, 2026
e540ec0
fix: guard docker cache hit with default according to sourcery sugges…
nnoce14 Jan 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ jobs:
distribution: 'temurin'
java-version: '17'

- name: Validate Docker and Pre-Pull Edgescan Image
run: |
docker --version
docker ps
docker pull edgescan/cicd-integration:latest # Ensure Edgescan image is available in this job and verify Docker access

- name: Verify required environment variables
run: |
if [ -z "$SONAR_TOKEN" ]; then
Expand All @@ -91,8 +97,18 @@ jobs:
echo "Error: SNYK_TOKEN is not set."
exit 1
fi
if [ -z "$ES_API_TOKEN" ]; then
echo "Error: ES_API_TOKEN is not set."
exit 1
fi
if [ -z "$ES_ASSET_ID" ]; then
echo "Error: ES_ASSET_ID is not set."
exit 1
fi
echo "All required environment variables are set."
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
ES_API_TOKEN: ${{ secrets.ES_API_TOKEN }}
ES_ASSET_ID: ${{ secrets.ES_ASSET_ID }}
9 changes: 7 additions & 2 deletions .snyk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ignore:
'SNYK-JS-SIRV-12558119':
- '* > sirv@2.0.4':
reason: 'Transitive dependency in Docusaurus; not exploitable in static site serving context (dev-only asset handler)'
expires: '2025-12-31T00:00:00.000Z'
expires: '2026-01-19T00:00:00.000Z'
created: '2025-11-06T15:57:00.000Z'
'SNYK-JS-JSYAML-13961110':
- '* > js-yaml':
Expand All @@ -27,4 +27,9 @@ ignore:
- '@docusaurus/preset-classic@3.9.2 > * > express':
reason: 'Transitive dependency in Docusaurus; not exploitable in current usage.'
expires: '2025-12-31T00:00:00.000Z'
created: '2025-12-02T09:39:00.000Z'
created: '2025-12-02T09:39:00.000Z'
'SNYK-JS-QS-14724253':
- '* > qs':
reason: 'Transitive dependency in express, @docusaurus/core, @apollo/server, apollo-link-rest; not exploitable in current usage.'
expires: '2026-01-19T00:00:00.000Z'
created: '2026-01-05T09:39:00.000Z'
14 changes: 11 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ pool:
vmImage: ubuntu-latest

variables:
- group: sonarcloud-credential-cellixjs
- group: edgescan-credential-cellixjs
- group: github-credential-cellixjs
- group: ui-community-settings-cellixjs
- group: snyk-credential-cellixjs
- group: sonarcloud-credential-cellixjs
- group: ui-community-settings-cellixjs
- name: deploymentDefaultLocation
value: 'eastus2'
- name: ServiceConnectionName
Expand Down Expand Up @@ -63,4 +64,11 @@ stages:
resourceGroupName: 'rg-sharethrift'
appSettingsJsonFileRelativePathPri: 'apps/api/build-pipelines/config/dev-pri.json'
frontDoorProfileName: 'simnova-afd'
frontDoorEndpointName: 'ocm-fde-ged3a8gxcvfxafaf'
frontDoorEndpointName: 'ocm-fde-ged3a8gxcvfxafaf'

- template: ./build-pipeline/core/monorepo-edgescan-stage.yml
parameters:
stageName: 'EdgeScan_DEV'
dependsOn: 'DEV'
vmImageName: $(vmImageName)
esAssetId: $(ES_ASSET_ID_DEV)
79 changes: 79 additions & 0 deletions build-pipeline/core/monorepo-edgescan-stage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
parameters:
- name: stageName
type: string
default: 'EdgeScan'
- name: dependsOn
type: string
- name: esAssetId
type: string
- name: vmImageName
type: string
default: 'ubuntu-latest'

stages:
- stage: ${{parameters.stageName}}
displayName: 'EdgeScan Security Scan'
dependsOn: ${{parameters.dependsOn}}
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
jobs:
- job: EdgeScan
displayName: 'EdgeScan CI/CD Integration'
variables:
# Generates a monthly key like "2026-01" to ensure the image is refreshed monthly
cacheMonth: $[format('{0:yyyy-MM}', pipeline.startTime)]
pool:
vmImage: ${{parameters.vmImageName}}
steps:
- task: Cache@2
displayName: 'Cache EdgeScan Docker Image'
inputs:
key: 'docker | edgescan | latest | $(cacheMonth)'
path: $(Pipeline.Workspace)/docker-cache
cacheHitVar: DOCKER_CACHE_HIT

- task: Bash@3
displayName: 'Pull or Restore EdgeScan Image'
inputs:
targetType: 'inline'
script: |
set -euo pipefail
mkdir -p $(Pipeline.Workspace)/docker-cache

if [ "${DOCKER_CACHE_HIT:-}" = "true" ] && [ -f "$(Pipeline.Workspace)/docker-cache/edgescan.tar" ]; then
echo "Restoring EdgeScan image from cache..."
docker load -i $(Pipeline.Workspace)/docker-cache/edgescan.tar
else
echo "Cache miss or missing tarball. Pulling from Docker Hub..."
docker pull edgescan/cicd-integration:latest
echo "Saving image to cache for future runs..."
docker save edgescan/cicd-integration:latest -o $(Pipeline.Workspace)/docker-cache/edgescan.tar
fi

- task: Bash@3
displayName: 'Run EdgeScan Scan'
inputs:
targetType: 'inline'
script: |
set -euo pipefail

if [ -z "$ES_API_TOKEN" ]; then
echo "Error: ES_API_TOKEN must be set in the variable group."
exit 1
fi

if [ -z "${{ parameters.esAssetId }}" ]; then
echo "Error: ES_ASSET_ID_DEV must be set in the variable group."
exit 1
fi

echo "Triggering EdgeScan for Asset ID: ${{ parameters.esAssetId }}"

docker run --tty --rm \
edgescan/cicd-integration:latest \
--api-token "$ES_API_TOKEN" \
--asset-id "${{ parameters.esAssetId }}" \
--start-scan \
--max-risk-threshold 3 \
--wait --color
env:
ES_API_TOKEN: $(ES_API_TOKEN)
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"snyk:iac": "snyk iac test iac/build/**/*.json --org=cellixjs --remote-repo-url=https://github.com/CellixJs/cellixjs",
"snyk:iac:report": "snyk iac test iac/build/**/*.json --org=cellixjs --remote-repo-url=https://github.com/CellixJs/cellixjs --target-reference=main --target-name=cellixjs-iac --report",
"analyze": "pnpm -r exec -- pnpm dlx @e18e/cli analyze",
"prepare": "husky"
"prepare": "husky",
"edgescan:run": "docker run --tty --rm edgescan/cicd-integration:latest --api-token $ES_API_TOKEN --asset-id $ES_ASSET_ID --start-scan --max-risk-threshold 3 --wait --color"
},
"devDependencies": {
"@amiceli/vitest-cucumber": "^5.1.2",
Expand Down Expand Up @@ -75,6 +76,11 @@
"vitest": "catalog:"
},
"pnpm": {
"auditConfig": {
"ignoreGhsas": [
"GHSA-6rw7-vpxm-498p"
]
},
"overrides": {
"vite": "catalog:",
"jiti": "2.6.1"
Expand Down