Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
2c76bf4
Update npm-example.yml
guybar Jun 2, 2024
ec9ee48
Update npm-example.yml
guybar Jun 2, 2024
7426743
Update npm-example.yml
guybar Jun 2, 2024
ff86c36
Update npm-example.yml
guybar Jun 2, 2024
0c6b687
Update package.json
guybar Jun 2, 2024
93e662a
Update package.json
guybar Jun 2, 2024
b2646c7
Update package.json
guybar Jun 2, 2024
9aff393
Update npm-example.yml
guybar Jun 2, 2024
da79b06
Update frogbot-scan-pull-request.yml
guybar Sep 4, 2024
32c85e4
Update npm-example.yml
guybar Sep 4, 2024
c08b776
Update npm-example.yml
guybar Sep 4, 2024
97b09ac
Update npm-example.yml
guybar Sep 4, 2024
36f9fd8
Update npm-example.yml
guybar Sep 5, 2024
97804f7
Update npm-example.yml
guybar Sep 5, 2024
8189abe
Update npm-example.yml
guybar Sep 5, 2024
fdef682
Update npm-example.yml
guybar Sep 5, 2024
5fd379c
Update npm-example.yml
guybar Sep 5, 2024
c45a001
Update npm-example.yml
guybar Sep 5, 2024
cc24330
Create fake-creds
guybar Sep 5, 2024
2c3d9f5
Update fake-creds
guybar Sep 5, 2024
bcefcca
Create Dockerfile
guybar Sep 5, 2024
d03521a
Update npm-example.yml
guybar Sep 5, 2024
58e2a5e
Update npm-example.yml
guybar Sep 5, 2024
7ddceb1
Update npm-example.yml
guybar Sep 5, 2024
74f5df2
Update npm-example.yml
guybar Sep 5, 2024
6fe6c11
Update npm-example.yml
guybar Sep 5, 2024
0f58e83
Update npm-example.yml
guybar Sep 8, 2024
df52b48
Update npm-example.yml
guybar Sep 8, 2024
9e878a2
Update npm-example.yml
guybar Sep 8, 2024
c94273c
Update npm-example.yml
guybar Sep 8, 2024
d95b805
Update npm-example.yml
guybar Sep 8, 2024
fec255e
Update npm-example.yml
guybar Sep 8, 2024
a56eddf
Update npm-example.yml
guybar Sep 9, 2024
a6de129
Update npm-example.yml
guybar Sep 9, 2024
3ea35ef
Update npm-example.yml
guybar Sep 10, 2024
589149f
Update npm-example.yml
guybar Sep 10, 2024
075b715
Update npm-example.yml
guybar Sep 10, 2024
a5aaaf2
Update frogbot-scan-pull-request.yml
guybar Sep 10, 2024
01d940f
Update frogbot-scan-repository.yml
guybar Sep 10, 2024
c656bab
Update frogbot-scan-pull-request.yml
guybar Sep 10, 2024
9363a7c
Update frogbot-scan-pull-request.yml
guybar Sep 10, 2024
6e1158a
Update frogbot-scan-pull-request.yml
guybar Sep 10, 2024
e728fbe
Update frogbot-scan-pull-request.yml
guybar Sep 10, 2024
b725e97
Update frogbot-scan-pull-request.yml
guybar Sep 10, 2024
1855554
Update npm-example.yml
guybar Sep 10, 2024
a8c3346
Update npm-example.yml
guybar Sep 17, 2024
e1d37f8
Update npm-example.yml
guybar Sep 17, 2024
d25272a
Update npm-example.yml
guybar Sep 17, 2024
9e0ebc4
Update npm-example.yml
guybar Sep 17, 2024
b0fb5fa
Update npm-example.yml
guybar Sep 17, 2024
f95fa7f
Update frogbot-scan-repository.yml
guybar Sep 17, 2024
1f23d75
Update frogbot-scan-repository.yml
guybar Sep 17, 2024
f00b9ca
Update frogbot-scan-repository.yml
guybar Sep 17, 2024
1d58c8b
Update frogbot-scan-repository.yml
guybar Sep 17, 2024
f18db8b
Update package.json
guybar Sep 17, 2024
5a712ba
Merge pull request #11 from guybar/guybar-patch-11
guybar Sep 17, 2024
770bb9c
Delete .github/workflows/rust-example.yaml
guybar Sep 17, 2024
482d625
Update README.md
guybar Sep 17, 2024
8844fd8
Update npm-example.yml
guybar Sep 24, 2024
61c272a
Update npm-example.yml
guybar Sep 24, 2024
ab94b32
Update npm-example.yml
guybar Sep 24, 2024
662a020
Update npm-example.yml
guybar Feb 10, 2025
015b211
Create workflowstest-npm-curation.yml
guybar Mar 18, 2025
2083a33
Delete .github/workflowstest-npm-curation.yml
guybar Mar 18, 2025
2498457
Create test-npm-curation.yml
guybar Mar 18, 2025
96c5f8f
Update test-npm-curation.yml
guybar Mar 18, 2025
534e4eb
Update package.json
guybar Mar 20, 2025
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
11 changes: 5 additions & 6 deletions .github/workflows/frogbot-scan-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ on:
permissions:
pull-requests: write
contents: read
# [Mandatory If using OIDC authentication protocol instead of JF_ACCESS_TOKEN]
#id-token: write
id-token: write
jobs:
scan-pull-request:
runs-on: ubuntu-latest
Expand All @@ -18,11 +17,11 @@ jobs:
env:
# [Mandatory]
# JFrog platform URL
JF_URL: ${{ secrets.JF_URL }}
JF_URL: ${{ vars.JF_URL }}

# [Mandatory if JF_USER and JF_PASSWORD are not provided]
# JFrog access token with 'read' permissions on Xray service
JF_ACCESS_TOKEN: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
# JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }}

# [Mandatory if JF_ACCESS_TOKEN is not provided]
# JFrog username with 'read' permissions for Xray. Must be provided with JF_PASSWORD
Expand Down Expand Up @@ -151,5 +150,5 @@ jobs:

# [Mandatory if using OIDC authentication protocol instead of JF_ACCESS_TOKEN]
# Insert to oidc-provider-name the 'Provider Name' defined in the OIDC integration configured in the JPD
#with:
#oidc-provider-name: jfrog-github-oidc
with:
oidc-provider-name: guy-github
12 changes: 6 additions & 6 deletions .github/workflows/frogbot-scan-repository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:
pull-requests: write
security-events: write
# [Mandatory If using OIDC authentication protocol instead of JF_ACCESS_TOKEN]
#id-token: write
# id-token: write
jobs:
scan-repository:
runs-on: ubuntu-latest
Expand All @@ -23,15 +23,15 @@ jobs:
env:
# [Mandatory]
# JFrog platform URL
JF_URL: ${{ secrets.JF_URL }}
JF_URL: ${{ vars.JF_URL }}

# [Mandatory if JF_USER and JF_PASSWORD are not provided]
# JFrog access token with 'read' permissions on Xray service
JF_ACCESS_TOKEN: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }}

# [Mandatory if JF_ACCESS_TOKEN is not provided]
# JFrog username with 'read' permissions for Xray. Must be provided with JF_PASSWORD
# JF_USER: ${{ secrets.JF_USER }}
JF_USER: guy-admin

# [Mandatory if JF_ACCESS_TOKEN is not provided]
# JFrog password. Must be provided with JF_USER
Expand Down Expand Up @@ -146,5 +146,5 @@ jobs:

# [Mandatory if using OIDC authentication protocol instead of JF_ACCESS_TOKEN]
# Insert to oidc-provider-name the 'Provider Name' defined in the OIDC integration configured in the JPD
#with:
#oidc-provider-name: jfrog-github-oidc
# with:
# oidc-provider-name: jfrog-github-oidc
49 changes: 34 additions & 15 deletions .github/workflows/npm-example.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
name: Push NPM Build to Artifactory
name: guy-demo-npm-build
on: workflow_dispatch
permissions:
actions: read # for detecting the Github Actions environment.
id-token: write # for creating OIDC tokens for signing.
packages: write # for uploading attestations.
contents: read

jobs:
build:
runs-on: ubuntu-latest
env:
JF_PROJECT: ${{ vars.JF_PROJECT_KEY }}
JF_URL: https://${{ vars.JF_URL }}/
JF_URL: ${{ vars.JF_URL }}
# JFROG_CLI_LOG_LEVEL: DEBUG
DOCKER_IMAGE_NAME: ${{ vars.JF_DOCKER_REPOSITORY }}npm-sample-docker:1.0.${{github.run_number}}
defaults:
run:
working-directory: ./npm/
Expand All @@ -20,16 +22,17 @@ jobs:
# This action checks out the code from the repository
- name: Checkout Code
uses: actions/checkout@v4

# Download the JFrog CLI and configure using JFrog Project and OIDC provider
- uses: jfrog/setup-jfrog-cli@v4
name: Setup JFrog CLI
id: setup-cli
env:
JF_URL: https://${{ vars.JF_URL }}/
JF_URL: ${{ vars.JF_URL }}
JF_PROJECT: ${{ vars.JF_PROJECT_KEY }}
with:
oidc-provider-name: jfrog-github-oidc
oidc-provider-name: guy-github
version: 2.69.0

# This command adds a new server configuration to the JFrog CLI
- run: |
Expand All @@ -39,25 +42,41 @@ jobs:
jf rt ping
# Configure JFrog CLI for NPM
- run: |
jf npmc --repo-deploy=ghjfdemo-ghjf-npm-virt --repo-resolve=ghjfdemo-ghjf-npm-remote
# NPM Install using the CLI
jf pip-config \
--repo-resolve=pip-virtual \
--repo-deploy=pip-virtual
jf npmc --repo-deploy=guy-npm-dev --repo-resolve=guy-npm-dev
# run curation audit
- run: |
jf curation-audit
# install npm packages
- run: |
jf npm install --build-name=ghdemo-npm-build --build-number=1.0.${{github.run_number}}
npm install
jf npm install
# Add GitHub Data to BuildInfo
- run: |
jf rt build-add-git ghdemo-npm-build 1.0.${{github.run_number}}
jf rt build-add-git
# Collect all Environmental information for NPM Build
- run: |
jf rt build-collect-env ghdemo-npm-build 1.0.${{github.run_number}}
jf rt build-collect-env
# Using NPM Publish to uplaod the NPM Build
- run: |
jf npm publish --build-name=ghdemo-npm-build --build-number=1.0.${{github.run_number}}
jf npm publish
# Build Docker image
- run: |
docker build -t $DOCKER_IMAGE_NAME .
# scan docker image
# - run: |
# jf docker scan $DOCKER_IMAGE_NAME
# Push image to Artifactory
- run: |
jf docker push $DOCKER_IMAGE_NAME
# Publish the BuildInfo into Artifactory
- run: |
jf rt build-publish ghdemo-npm-build 1.0.${{github.run_number}}
jf rt build-publish
# Scan the NPM Build with Xray
- run: |
jf build-scan ghdemo-npm-build 1.0.${{github.run_number}}
jf build-scan
# Promote the Build from Dev to Production
- run: |
jf rt build-promote ghdemo-npm-build 1.0.${{github.run_number}} ghjfdemo-ghjf-npm-prod-local --status=production
jf rt build-promote --status=production
33 changes: 0 additions & 33 deletions .github/workflows/rust-example.yaml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/test-npm-curation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: guy-demo-npm-build-curation
on: workflow_dispatch
permissions:
actions: read # for detecting the Github Actions environment.
id-token: write # for creating OIDC tokens for signing.
packages: write # for uploading attestations.
contents: read

jobs:
build:
runs-on: ubuntu-latest
env:
JF_PROJECT: ${{ vars.JF_PROJECT_KEY }}
JF_URL: ${{ vars.JF_URL }}
# JFROG_CLI_LOG_LEVEL: DEBUG
DOCKER_IMAGE_NAME: ${{ vars.JF_DOCKER_REPOSITORY }}npm-sample-docker:1.0.${{github.run_number}}
defaults:
run:
working-directory: ./npm/

steps:
# This action checks out the code from the repository
- name: Checkout Code
uses: actions/checkout@v4

# Download the JFrog CLI and configure using JFrog Project and OIDC provider
- uses: jfrog/setup-jfrog-cli@v4
name: Setup JFrog CLI
id: setup-cli
env:
JF_URL: ${{ vars.JF_URL }}
JF_PROJECT: ${{ vars.JF_PROJECT_KEY }}
with:
oidc-provider-name: guy-github

# install npm packages
- run: |
jf npmc --repo-deploy=guy-npm-dev --repo-resolve=guy-npm-dev
jf npm install
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ SolEng team will be placing samples for our customers on the supported packages

The Packages being coverage currently:
- Nuget / C#
- Cargo / Rust
- Cargo / Rust
- Npm / Javascript

[![Scanned by Frogbot](https://raw.github.com/jfrog/frogbot/master/images/frogbot-badge.svg)](https://docs.jfrog-applications.jfrog.io/jfrog-applications/frogbot)
7 changes: 7 additions & 0 deletions npm/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 3000
CMD ["node", "app.js"]
3 changes: 3 additions & 0 deletions npm/fake-creds
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
AKIAJXBOVX5Q2EULDUIA
SqcyDpetv+pCsbNYWHDLE8yR5mJ13MI+4d8NOwtM
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dd
9 changes: 4 additions & 5 deletions npm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version": "1.0.0",
"description": "",
"main": "index.js",
"publishConfig":{"registry":"https://soleng.jfrog.io/artifactory/api/npm/ghjfdemo-ghjf-npm-virt/"},
"scripts": {
"dev": "nodemon ./index.js",
"ui": "browser-sync start --config bs-config.js"
Expand All @@ -16,20 +15,20 @@
"nodemon": "^2.0.6"
},
"dependencies": {
"babel": "^6.23.0",
"express": "^4.17.1",
"hoek": "^2.16.3",
"lodash": "^4.17.13",
"npm": "^6.14.8",
"protobufjs": "^6.11.0",
"pug": "^3.0.0",
"jsonwebtoken": "^8.5.1",
"cors": "^2.8.5",
"cors.js": "0.0.1-security",
"mongoose": "^5.7.7",
"nodemailer": "^6.3.1",
"nodemailer-mailgun-transport": "^1.4.0",
"url-slug": "^2.2.0",
"validator": "^12.0.0",
"open-graph": "0.2.6"
"open-graph": "0.2.6",
"parse-url": "^6.0.5",
"undici": "^5.26.2"
}
}
Loading