Skip to content

Commit 889a328

Browse files
author
JFrog Pipelines Step
committed
Merge remote-tracking branch 'origin/dev'
2 parents 8f0f9cf + 4716106 commit 889a328

File tree

137 files changed

+2751
-2184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+2751
-2184
lines changed

.github/workflows/action-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
steps:
1818
# Checkout and install prerequisites
1919
- name: Checkout
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121
- name: Setup NodeJS
2222
uses: actions/setup-node@v3
2323
with:

.github/workflows/analysis.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,20 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout Source
12-
uses: actions/checkout@v3
12+
uses: actions/checkout@v4
13+
1314
- name: Install Go
1415
uses: actions/setup-go@v3
1516
with:
1617
go-version: 1.20.x
1718

19+
- name: Go Cache
20+
uses: actions/cache@v3
21+
with:
22+
path: ~/go/pkg/mod
23+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
24+
restore-keys: ${{ runner.os }}-go-
25+
1826
# Generate mocks
1927
- name: Generate mocks
2028
run: go generate ./...
@@ -31,7 +39,8 @@ jobs:
3139
GOFLAGS: -buildvcs=false
3240
steps:
3341
- name: Checkout Source
34-
uses: actions/checkout@v3
42+
uses: actions/checkout@v4
43+
3544
- name: Install Go
3645
uses: actions/setup-go@v3
3746
with:

.github/workflows/frogbot-scan-pr.yml

-39
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
name: "Frogbot Scan Pull Request"
2+
on:
3+
pull_request_target:
4+
types: [ opened, synchronize ]
5+
permissions:
6+
pull-requests: write
7+
contents: read
8+
jobs:
9+
scan-pull-request:
10+
runs-on: ubuntu-latest
11+
# A pull request needs to be approved before Frogbot scans it. Any GitHub user who is associated with the
12+
# "frogbot" GitHub environment can approve the pull request to be scanned.
13+
environment: frogbot
14+
steps:
15+
- uses: jfrog/frogbot@v2
16+
env:
17+
JFROG_CLI_LOG_LEVEL: "DEBUG"
18+
# [Mandatory]
19+
# JFrog platform URL (This functionality requires version 3.29.0 or above of Xray)
20+
JF_URL: ${{ secrets.FROGBOT_URL }}
21+
22+
# [Mandatory if JF_USER and JF_PASSWORD are not provided]
23+
# JFrog access token with 'read' permissions on Xray service
24+
JF_ACCESS_TOKEN: ${{ secrets.FROGBOT_ACCESS_TOKEN }}
25+
26+
# [Mandatory]
27+
# The GitHub token is automatically generated for the job
28+
JF_GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
30+
# [Optional, default: https://api.github.com]
31+
# API endpoint to GitHub
32+
# JF_GIT_API_ENDPOINT: https://github.example.com
33+
34+
# [Optional]
35+
# By default, the Frogbot workflows download the Frogbot executable as well as other tools
36+
# needed from https://releases.jfrog.io
37+
# If the machine that runs Frogbot has no access to the internet, follow these steps to allow the
38+
# executable to be downloaded from an Artifactory instance, which the machine has access to:
39+
#
40+
# 1. Login to the Artifactory UI, with a user who has admin credentials.
41+
# 2. Create a Remote Repository with the following properties set.
42+
# Under the 'Basic' tab:
43+
# Package Type: Generic
44+
# URL: https://releases.jfrog.io
45+
# Under the 'Advanced' tab:
46+
# Uncheck the 'Store Artifacts Locally' option
47+
# 3. Set the value of the 'JF_RELEASES_REPO' variable with the Repository Key you created.
48+
# JF_RELEASES_REPO: ""
49+
50+
# [Optional]
51+
# Configure the SMTP server to enable Frogbot to send emails with detected secrets in pull request scans.
52+
# SMTP server URL including should the relevant port: (Example: smtp.server.com:8080)
53+
JF_SMTP_SERVER: ${{ secrets.JF_SMTP_SERVER }}
54+
55+
# [Mandatory if JF_SMTP_SERVER is set]
56+
# The username required for authenticating with the SMTP server.
57+
JF_SMTP_USER: ${{ secrets.JF_SMTP_USER }}
58+
59+
# [Mandatory if JF_SMTP_SERVER is set]
60+
# The password associated with the username required for authentication with the SMTP server.
61+
JF_SMTP_PASSWORD: ${{ secrets.JF_SMTP_PASSWORD }}
62+
63+
# [Optional]
64+
# List of comma separated email addresses to receive email notifications about secrets
65+
# detected during pull request scanning. The notification is also sent to the email set
66+
# in the committer git profile regardless of whether this variable is set or not.
67+
JF_EMAIL_RECEIVERS: "[email protected]"
68+
69+
##########################################################################
70+
## If your project uses a 'frogbot-config.yml' file, you can define ##
71+
## the following variables inside the file, instead of here. ##
72+
##########################################################################
73+
74+
# [Mandatory if the two conditions below are met]
75+
# 1. The project uses yarn 2, NuGet or .NET Core to download its dependencies
76+
# 2. The `installCommand` variable isn't set in your frogbot-config.yml file.
77+
#
78+
# The command that installs the project dependencies (e.g "nuget restore")
79+
# JF_INSTALL_DEPS_CMD: ""
80+
81+
# [Optional, default: "."]
82+
# Relative path to the root of the project in the Git repository
83+
# JF_WORKING_DIR: path/to/project/dir
84+
85+
# [Optional]
86+
# Xray Watches. Learn more about them here: https://www.jfrog.com/confluence/display/JFROG/Configuring+Xray+Watches
87+
# JF_WATCHES: <watch-1>,<watch-2>...<watch-n>
88+
89+
# [Optional]
90+
# JFrog project. Learn more about it here: https://www.jfrog.com/confluence/display/JFROG/Projects
91+
# JF_PROJECT: <project-key>
92+
93+
# [Optional, default: "FALSE"]
94+
# Displays all existing vulnerabilities, including the ones that were added by the pull request.
95+
# JF_INCLUDE_ALL_VULNERABILITIES: "TRUE"
96+
97+
# [Optional, default: "TRUE"]
98+
# Fails the Frogbot task if any security issue is found.
99+
# JF_FAIL: "FALSE"
100+
101+
# [Optional]
102+
# Frogbot will download the project dependencies if they're not cached locally. To download the
103+
# dependencies from a virtual repository in Artifactory, set the name of the repository. There's no
104+
# need to set this value, if it is set in the frogbot-config.yml file.
105+
# JF_DEPS_REPO: ""
106+
107+
# [Optional, Default: "FALSE"]
108+
# If TRUE, Frogbot creates a single pull request with all the fixes.
109+
# If false, Frogbot creates a separate pull request for each fix.
110+
# JF_GIT_AGGREGATE_FIXES: "FALSE"
111+
112+
# [Optional, Default: "FALSE"]
113+
# Handle vulnerabilities with fix versions only
114+
# JF_FIXABLE_ONLY: "TRUE"
115+
116+
# [Optional]
117+
# Set the minimum severity for vulnerabilities that should be fixed and commented on in pull requests
118+
# The following values are accepted: Low, Medium, High or Critical
119+
# JF_MIN_SEVERITY: ""

.github/workflows/frogbot-scan-and-fix.yml renamed to .github/workflows/frogbot-scan-repository.yml

+10-19
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Frogbot Scan and Fix"
1+
name: "Frogbot Scan Repository"
22
on:
33
workflow_dispatch:
44
schedule:
@@ -11,38 +11,25 @@ permissions:
1111
jobs:
1212
scan-repository:
1313
runs-on: ubuntu-latest
14+
name: Scan Repository (${{ matrix.branch }} branch)
1415
strategy:
1516
matrix:
1617
# The repository scanning will be triggered periodically on the following branches.
1718
branch: [ "dev" ]
1819
steps:
19-
20-
# Install prerequisites
21-
- name: Setup Go
22-
uses: actions/setup-go@v3
23-
with:
24-
go-version: 1.20.x
25-
2620
- uses: jfrog/frogbot@v2
2721
env:
22+
JFROG_CLI_LOG_LEVEL: "DEBUG"
2823
# [Mandatory]
29-
# JFrog platform URL
24+
# JFrog platform URL (This functionality requires version 3.29.0 or above of Xray)
3025
JF_URL: ${{ secrets.FROGBOT_URL }}
3126

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

36-
# [Mandatory if JF_ACCESS_TOKEN is not provided]
37-
# JFrog username with 'read' permissions for Xray. Must be provided with JF_PASSWORD
38-
# JF_USER: ${{ secrets.JF_USER }}
39-
40-
# [Mandatory if JF_ACCESS_TOKEN is not provided]
41-
# JFrog password. Must be provided with JF_USER
42-
# JF_PASSWORD: ${{ secrets.JF_PASSWORD }}
43-
4431
# [Mandatory]
45-
# The GitHub token automatically generated for the job
32+
# The GitHub token is automatically generated for the job
4633
JF_GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4734

4835
# [Mandatory]
@@ -59,7 +46,7 @@ jobs:
5946
# If the machine that runs Frogbot has no access to the internet, follow these steps to allow the
6047
# executable to be downloaded from an Artifactory instance, which the machine has access to:
6148
#
62-
# 1. Login to the Artifactory UI, with a user which has admin credentials.
49+
# 1. Login to the Artifactory UI, with a user who has admin credentials.
6350
# 2. Create a Remote Repository with the following properties set.
6451
# Under the 'Basic' tab:
6552
# Package Type: Generic
@@ -125,3 +112,7 @@ jobs:
125112
# Set the minimum severity for vulnerabilities that should be fixed and commented on in pull requests
126113
# The following values are accepted: Low, Medium, High or Critical
127114
# JF_MIN_SEVERITY: ""
115+
116+
# [Optional, Default: [email protected]]
117+
# Set the email of the commit author
118+
# JF_GIT_EMAIL_AUTHOR: ""

.github/workflows/test.yml

+23-17
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
labels: "safe to test"
2424

2525
- name: Checkout code
26-
uses: actions/checkout@v3
26+
uses: actions/checkout@v4
2727
with:
2828
ref: ${{ github.event.pull_request.head.sha }}
2929

@@ -42,25 +42,34 @@ jobs:
4242
# Generate mocks
4343
- name: Generate mocks
4444
run: go generate ./...
45-
if: ${{ matrix.suite != 'unit' }}
4645

4746
- name: Lint
4847
run: go vet -v ./...
4948

5049
tests:
5150
needs: Pretest
52-
name: ${{ matrix.suite }} Tests (${{ matrix.os }})
51+
name: ${{ matrix.suite.name }} Tests (${{ matrix.os }})
5352
runs-on: ${{ matrix.os }}-latest
5453
env:
5554
JFROG_CLI_LOG_LEVEL: "DEBUG"
5655
strategy:
5756
fail-fast: false
5857
matrix:
59-
suite: [ unit, scanrepository, scanpullrequest, packagehandlers ]
58+
suite:
59+
- name: 'Unit'
60+
61+
- name: 'Scan Repository'
62+
package: 'scanrepository'
63+
64+
- name: 'Scan Pull Request'
65+
package: 'scanpullrequest'
66+
67+
- name: 'Package Handlers'
68+
package: 'packagehandlers'
6069
os: [ ubuntu, windows, macos ]
6170
steps:
6271
# Configure prerequisites
63-
- uses: actions/checkout@v3
72+
- uses: actions/checkout@v4
6473
with:
6574
ref: ${{ github.event.pull_request.head.sha }}
6675
- name: Setup Go
@@ -89,24 +98,21 @@ jobs:
8998
- name: Install python components
9099
run: python -m pip install pipenv poetry
91100

101+
- name: Install dotnet
102+
uses: actions/setup-dotnet@v3
103+
with:
104+
dotnet-version: "6.x"
105+
92106
# Generate mocks
93107
- name: Generate mocks
94108
run: go generate ./...
95-
if: ${{ matrix.suite != 'unit' }}
96-
97-
- name: unit Tests
98-
run: go test github.com/jfrog/frogbot -v -race -timeout 30m -cover
99-
env:
100-
JF_URL: ${{ secrets.PLATFORM_URL }}
101-
JF_ACCESS_TOKEN: ${{ secrets.PLATFORM_ADMIN_TOKEN }}
102-
if: ${{ matrix.suite == 'unit' }}
109+
if: ${{ matrix.suite.name != 'Unit' }}
103110

104-
- name: ${{ matrix.test }} Tests
105-
run: go test github.com/jfrog/frogbot/${{ matrix.suite }} -v -race -timeout 30m -cover
111+
- name: Run Tests
112+
run: go test github.com/jfrog/frogbot/${{ matrix.suite.package }} -v -race -timeout 30m -cover
106113
env:
107114
JF_URL: ${{ secrets.PLATFORM_URL }}
108115
JF_ACCESS_TOKEN: ${{ secrets.PLATFORM_ADMIN_TOKEN }}
109-
if: ${{ matrix.suite != 'unit' }}
110116

111117
# Build and run frogbot current changes for visual sanity check.
112118
sanity-pull-request:
@@ -120,7 +126,7 @@ jobs:
120126
go-version: 1.20.x
121127

122128
- name: Checkout code
123-
uses: actions/checkout@v3
129+
uses: actions/checkout@v4
124130
with:
125131
ref: ${{ github.event.pull_request.head.sha }}
126132

.github/workflows/update-v2-tag.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout
11-
uses: actions/checkout@v3
11+
uses: actions/checkout@v4
1212
- name: Update v2 tag
1313
run: git tag -f v2
1414
- name: Push changes

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@ Supported package management tools:
254254

255255
- Go
256256
- Maven
257+
- NuGet
258+
- .NET
257259
- npm
258260
- Pip
259261
- Pipenv

action/node_modules/.package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)