Skip to content

Commit b85e46e

Browse files
ci: PoC to add Frogbot security workflows. (#4)
1 parent 7e0a792 commit b85e46e

File tree

3 files changed

+115
-0
lines changed

3 files changed

+115
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Frogbot security scan workflows
2+
3+
see https://github.com/ansys-internal/ci-templates/pull/176
4+
5+
## Status and TODO:
6+
7+
- PoC to run Frogbot on github.com/ansys organization repositories
8+
- Connects to https://ansyscpp.jfrog.io SaaS instance - accessible from GitHub-hosted runners. This SaaS intance is temporary.
9+
- TODO: connect to https://artifactory.ansys.com - requires self-hosted runners with internal network access. Ideally through runner scale sets hosted on Ansys-maintained k8s.
10+
- TODO: run in container with verified Frogbot execution environment. Need package manager executeables.
11+
- TODO: verify Frogbot support and performance with Docker, Docker compose.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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+
# [Mandatory If using OIDC authentication protocol instead of JF_ACCESS_TOKEN]
9+
id-token: write
10+
jobs:
11+
scan-pull-request:
12+
runs-on: ubuntu-latest-4-cores
13+
# container:
14+
# # Official .NET SDK image with python3-virtualenv package installed. One-time manual creation.
15+
# image: azuekubeacr03.azurecr.io/dotnet/sdk-python3-virtualenv:9.0.201-noble-amd64
16+
# A pull request needs to be approved before Frogbot scans it. Any GitHub user who is associated with the
17+
# "frogbot" GitHub environment can approve the pull request to be scanned.
18+
# environment: frogbot
19+
steps:
20+
- uses: jfrog/frogbot@v2
21+
env:
22+
# [Mandatory]
23+
# JFrog platform URL
24+
# Temporary JFrog SaaS instance, hosted by JFrog for new feature evaluation.
25+
# Accessible from GitHub-hosted runners.
26+
JF_URL: https://ansyscpp.jfrog.io/
27+
28+
# [Mandatory if JF_USER and JF_PASSWORD are not provided]
29+
# JFrog access token with 'read' permissions on Xray service
30+
# JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }}
31+
32+
# [Mandatory if JF_ACCESS_TOKEN is not provided]
33+
# JFrog username with 'read' permissions for Xray. Must be provided with JF_PASSWORD
34+
# JF_USER: ${{ secrets.JF_USER }}
35+
36+
# [Mandatory if JF_ACCESS_TOKEN is not provided]
37+
# JFrog password. Must be provided with JF_USER
38+
# JF_PASSWORD: ${{ secrets.JF_PASSWORD }}
39+
40+
# [Mandatory]
41+
# The GitHub token is automatically generated for the job
42+
JF_GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
44+
# [Mandatory if using OIDC authentication protocol instead of JF_ACCESS_TOKEN]
45+
# Insert to oidc-provider-name the 'Provider Name' defined in the OIDC integration configured in the JPD
46+
# OIDC identiy mappings are defined in JFrog Platform administration -> General Management -> Manage Integrations
47+
with:
48+
oidc-provider-name: "github-actions-oidc"
49+
oidc-audience: GitHub ansys-internal CI/CD Pipelines
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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+
# [Mandatory If using OIDC authentication protocol instead of JF_ACCESS_TOKEN]
12+
id-token: write
13+
jobs:
14+
scan-repository:
15+
runs-on: ubuntu-latest-4-cores
16+
# container:
17+
# # Official .NET SDK image with python3-virtualenv package installed. One-time manual creation.
18+
# image: azuekubeacr03.azurecr.io/dotnet/sdk-python3-virtualenv:9.0.201-noble-amd64
19+
strategy:
20+
matrix:
21+
# The repository scanning will be triggered periodically on the following branches.
22+
branch: ["main"]
23+
steps:
24+
- uses: jfrog/frogbot@v2
25+
env:
26+
# [Mandatory]
27+
# JFrog platform URL
28+
# Accessible from GitHub-hosted runners.
29+
JF_URL: https://ansyscpp.jfrog.io/
30+
31+
# [Mandatory if JF_USER and JF_PASSWORD are not provided]
32+
# JFrog access token with 'read' permissions on Xray service
33+
# JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }}
34+
35+
# [Mandatory if JF_ACCESS_TOKEN is not provided]
36+
# JFrog username with 'read' permissions for Xray. Must be provided with JF_PASSWORD
37+
# JF_USER: ${{ secrets.JF_USER }}
38+
39+
# [Mandatory if JF_ACCESS_TOKEN is not provided]
40+
# JFrog password. Must be provided with JF_USER
41+
# JF_PASSWORD: ${{ secrets.JF_PASSWORD }}
42+
43+
# [Mandatory]
44+
# The GitHub token is automatically generated for the job
45+
JF_GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
47+
# [Mandatory]
48+
# The name of the branch on which Frogbot will perform the scan
49+
JF_GIT_BASE_BRANCH: ${{ matrix.branch }}
50+
51+
# [Mandatory if using OIDC authentication protocol instead of JF_ACCESS_TOKEN]
52+
# Insert to oidc-provider-name the 'Provider Name' defined in the OIDC integration configured in the JPD
53+
with:
54+
oidc-provider-name: "github-actions-oidc"
55+
oidc-audience: GitHub ansys-internal CI/CD Pipelines

0 commit comments

Comments
 (0)