Skip to content

Commit af76369

Browse files
Update vision-analysis-github.yaml
1 parent 1dbc2cf commit af76369

File tree

1 file changed

+40
-7
lines changed

1 file changed

+40
-7
lines changed
Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,46 @@
1-
name: Vdoo Security Scan
1+
name: NodeGoat Vision Analysis
22
on: [push, pull_request]
33

44
jobs:
5-
scan:
5+
build-and-scan:
66
runs-on: ubuntu-latest
7+
8+
# Use the official Vision analysis container
9+
container:
10+
image: ${{ vars.VISION_CLI_REGISTRY }}/vision_analysis:${{ vars.VISION_ANALYSIS_TAG }}
11+
712
steps:
8-
- uses: actions/checkout@v4
9-
- name: Run Vdoo Scan
13+
- name: Checkout NodeGoat Code
14+
uses: actions/checkout@v4
15+
16+
- name: Bundle Source Code
17+
run: |
18+
# Create a compressed file of your NodeGoat source code for analysis
19+
# Excluding node_modules to keep the upload small and fast
20+
tar -czf nodegoat-source.tar.gz . --exclude=node_modules --exclude=.git
21+
22+
- name: Run Vision Analysis
23+
shell: bash
1024
run: |
11-
# Use the Vdoo/JFrog CLI or Action
12-
curl -sSL https://get.vdoo.com/vision-cli | bash
13-
./vision-cli scan --token ${{ secrets.VISION_TOKEN }}
25+
echo "Uploading NodeGoat source to Vision Vdoo..."
26+
27+
# This command uploads the tarball and starts the scan
28+
vdoo_analysis analyze \
29+
--token ${{ secrets.VISION_TOKEN }} \
30+
--base_url ${{ vars.VISION_BASE_URL }} \
31+
--artifact-id ${{ vars.VISION_ARTIFACT_ID }} \
32+
--image-path nodegoat-source.tar.gz \
33+
-n "NodeGoat-Scan-${{ github.run_id }}" \
34+
--verbose \
35+
--output-uuid scan_uuid.txt
36+
37+
SCAN_UUID=$(cat scan_uuid.txt)
38+
echo "Scan started successfully! UUID: ${SCAN_UUID}"
39+
40+
# Optional: Wait for status to confirm it reached the platform
41+
vdoo_analysis images get_status \
42+
--token ${{ secrets.VISION_TOKEN }} \
43+
--base_url ${{ vars.VISION_BASE_URL }} \
44+
--image-uuid ${SCAN_UUID}
45+
46+
echo "Done! You can now see the results at ${{ vars.VISION_BASE_URL }}"

0 commit comments

Comments
 (0)