Skip to content

Commit 5edd3c9

Browse files
authored
Fix Xray Gradle and Analyzer tests (#2174)
1 parent bd082a1 commit 5edd3c9

File tree

92 files changed

+953
-237
lines changed

Some content is hidden

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

92 files changed

+953
-237
lines changed

.github/workflows/accessTests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ concurrency:
1515
jobs:
1616
Access-Tests:
1717
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.event_name == 'push'
18-
name: ${{ matrix.os }}
18+
name: Access tests (${{ matrix.os }})
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
os: [ ubuntu-latest, macos-latest, windows-latest ]
23-
runs-on: ${{ matrix.os }}
22+
os: [ ubuntu, windows, macos ]
23+
runs-on: ${{ matrix.os }}-latest
2424
steps:
2525
- name: Install Go
2626
uses: actions/setup-go@v3

.github/workflows/analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
os: [ubuntu-latest, macos-latest, windows-latest]
19-
runs-on: ${{ matrix.os }}
18+
os: [ ubuntu, windows, macos ]
19+
runs-on: ${{ matrix.os }}-latest
2020
steps:
2121
- name: Install Go
2222
uses: actions/setup-go@v3

.github/workflows/artifactoryTests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
suite: [ artifactory, artifactoryProject ]
23-
os: [ ubuntu-latest, macos-latest, windows-latest ]
24-
runs-on: ${{ matrix.os }}
23+
os: [ ubuntu, windows, macos ]
24+
runs-on: ${{ matrix.os }}-latest
2525
steps:
2626
- name: Install Go
2727
uses: actions/setup-go@v3

.github/workflows/distributionTests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ concurrency:
1515
jobs:
1616
Distribution-Tests:
1717
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.event_name == 'push'
18-
name: ${{ matrix.os }}
18+
name: Distribution tests (${{ matrix.os }})
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
os: [ubuntu-latest, macos-latest, windows-latest]
23-
runs-on: ${{ matrix.os }}
22+
os: [ ubuntu, windows, macos ]
23+
runs-on: ${{ matrix.os }}-latest
2424
steps:
2525
- name: Install Go
2626
uses: actions/setup-go@v3

.github/workflows/frogbot-scan-and-fix.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

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

Lines changed: 0 additions & 53 deletions
This file was deleted.
Lines changed: 119 additions & 0 deletions
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: "eco-system@jfrog.com"
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: ""
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
name: "Frogbot Scan Repository"
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
# The repository will be scanned once a day at 00:00 GMT.
6+
- cron: "0 0 * * *"
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
security-events: write
11+
jobs:
12+
scan-repository:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
# The repository scanning will be triggered periodically on the following branches.
17+
branch: [ "dev" ]
18+
steps:
19+
- uses: jfrog/frogbot@v2
20+
env:
21+
JFROG_CLI_LOG_LEVEL: "DEBUG"
22+
# [Mandatory]
23+
# JFrog platform URL (This functionality requires version 3.29.0 or above of Xray)
24+
JF_URL: ${{ secrets.FROGBOT_URL }}
25+
26+
# [Mandatory if JF_USER and JF_PASSWORD are not provided]
27+
# JFrog access token with 'read' permissions on Xray service
28+
JF_ACCESS_TOKEN: ${{ secrets.FROGBOT_ACCESS_TOKEN }}
29+
30+
# [Mandatory if JF_ACCESS_TOKEN is not provided]
31+
# JFrog username with 'read' permissions for Xray. Must be provided with JF_PASSWORD
32+
# JF_USER: ${{ secrets.JF_USER }}
33+
34+
# [Mandatory if JF_ACCESS_TOKEN is not provided]
35+
# JFrog password. Must be provided with JF_USER
36+
# JF_PASSWORD: ${{ secrets.JF_PASSWORD }}
37+
38+
# [Mandatory]
39+
# The GitHub token is automatically generated for the job
40+
JF_GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
42+
# [Mandatory]
43+
# The name of the branch on which Frogbot will perform the scan
44+
JF_GIT_BASE_BRANCH: ${{ matrix.branch }}
45+
46+
# [Optional, default: https://api.github.com]
47+
# API endpoint to GitHub
48+
# JF_GIT_API_ENDPOINT: https://github.example.com
49+
50+
# [Optional]
51+
# By default, the Frogbot workflows download the Frogbot executable as well as other tools
52+
# needed from https://releases.jfrog.io
53+
# If the machine that runs Frogbot has no access to the internet, follow these steps to allow the
54+
# executable to be downloaded from an Artifactory instance, which the machine has access to:
55+
#
56+
# 1. Login to the Artifactory UI, with a user who has admin credentials.
57+
# 2. Create a Remote Repository with the following properties set.
58+
# Under the 'Basic' tab:
59+
# Package Type: Generic
60+
# URL: https://releases.jfrog.io
61+
# Under the 'Advanced' tab:
62+
# Uncheck the 'Store Artifacts Locally' option
63+
# 3. Set the value of the 'JF_RELEASES_REPO' variable with the Repository Key you created.
64+
# JF_RELEASES_REPO: ""
65+
66+
##########################################################################
67+
## If your project uses a 'frogbot-config.yml' file, you can define ##
68+
## the following variables inside the file, instead of here. ##
69+
##########################################################################
70+
71+
# [Optional, default: "."]
72+
# Relative path to the root of the project in the Git repository
73+
# JF_WORKING_DIR: path/to/project/dir
74+
75+
# [Optional]
76+
# Xray Watches. Learn more about them here: https://www.jfrog.com/confluence/display/JFROG/Configuring+Xray+Watches
77+
# JF_WATCHES: <watch-1>,<watch-2>...<watch-n>
78+
79+
# [Optional]
80+
# JFrog project. Learn more about it here: https://www.jfrog.com/confluence/display/JFROG/Projects
81+
# JF_PROJECT: <project-key>
82+
83+
# [Optional, default: "TRUE"]
84+
# Fails the Frogbot task if any security issue is found.
85+
# JF_FAIL: "FALSE"
86+
87+
# [Optional]
88+
# Frogbot will download the project dependencies, if they're not cached locally. To download the
89+
# dependencies from a virtual repository in Artifactory, set the name of the repository. There's no
90+
# need to set this value, if it is set in the frogbot-config.yml file.
91+
# JF_DEPS_REPO: ""
92+
93+
# [Optional]
94+
# Template for the branch name generated by Frogbot when creating pull requests with fixes.
95+
# The template must include ${BRANCH_NAME_HASH}, to ensure that the generated branch name is unique.
96+
# The template can optionally include the ${IMPACTED_PACKAGE} and ${FIX_VERSION} variables.
97+
# JF_BRANCH_NAME_TEMPLATE: "frogbot-${IMPACTED_PACKAGE}-${BRANCH_NAME_HASH}"
98+
99+
# [Optional]
100+
# Template for the commit message generated by Frogbot when creating pull requests with fixes
101+
# The template can optionally include the ${IMPACTED_PACKAGE} and ${FIX_VERSION} variables.
102+
# JF_COMMIT_MESSAGE_TEMPLATE: "Upgrade ${IMPACTED_PACKAGE} to ${FIX_VERSION}"
103+
104+
# [Optional]
105+
# Template for the pull request title generated by Frogbot when creating pull requests with fixes.
106+
# The template can optionally include the ${IMPACTED_PACKAGE} and ${FIX_VERSION} variables.
107+
# JF_PULL_REQUEST_TITLE_TEMPLATE: "[🐸 Frogbot] Upgrade ${IMPACTED_PACKAGE} to ${FIX_VERSION}"
108+
109+
# [Optional, Default: "FALSE"]
110+
# If TRUE, Frogbot creates a single pull request with all the fixes.
111+
# If FALSE, Frogbot creates a separate pull request for each fix.
112+
# JF_GIT_AGGREGATE_FIXES: "FALSE"
113+
114+
# [Optional, Default: "FALSE"]
115+
# Handle vulnerabilities with fix versions only
116+
# JF_FIXABLE_ONLY: "TRUE"
117+
118+
# [Optional]
119+
# Set the minimum severity for vulnerabilities that should be fixed and commented on in pull requests
120+
# The following values are accepted: Low, Medium, High or Critical
121+
# JF_MIN_SEVERITY: ""
122+
123+
# [Optional, Default: eco-system+frogbot@jfrog.com]
124+
# Set the email of the commit author
125+
# JF_GIT_EMAIL_AUTHOR: ""

0 commit comments

Comments
 (0)