omniauth-auth0 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.devcontainer/devcontainer.json +1 -1
- data/.github/CODEOWNERS +1 -1
- data/.github/ISSUE_TEMPLATE/Bug Report.yml +76 -0
- data/.github/ISSUE_TEMPLATE/Feature Request.yml +53 -0
- data/.github/ISSUE_TEMPLATE/config.yml +2 -2
- data/.github/actions/get-prerelease/action.yml +30 -0
- data/.github/actions/get-release-notes/action.yml +42 -0
- data/.github/actions/get-version/action.yml +21 -0
- data/.github/actions/release-create/action.yml +47 -0
- data/.github/actions/rl-scanner/action.yml +71 -0
- data/.github/actions/rubygems-publish/action.yml +30 -0
- data/.github/actions/setup/action.yml +28 -0
- data/.github/actions/tag-exists/action.yml +36 -0
- data/.github/dependabot.yml +13 -0
- data/.github/workflows/codeql.yml +53 -0
- data/.github/workflows/matrix.json +7 -0
- data/.github/workflows/publish.yml +33 -0
- data/.github/workflows/rl-scanner.yml +65 -0
- data/.github/workflows/ruby-release.yml +72 -0
- data/.github/workflows/snyk.yml +40 -0
- data/.github/workflows/test.yml +69 -0
- data/.shiprc +2 -1
- data/.version +1 -0
- data/CHANGELOG.md +20 -0
- data/EXAMPLES.md +19 -5
- data/Gemfile +4 -5
- data/Gemfile.lock +128 -91
- data/README.md +42 -1
- data/lib/omniauth/auth0/jwt_token.rb +38 -0
- data/lib/omniauth/auth0/jwt_validator.rb +19 -3
- data/lib/omniauth/strategies/auth0.rb +48 -14
- data/lib/omniauth-auth0/version.rb +1 -1
- data/omniauth-auth0.gemspec +1 -0
- data/spec/omniauth/auth0/jwt_token_spec.rb +87 -0
- data/spec/omniauth/auth0/jwt_validator_spec.rb +109 -31
- data/spec/omniauth/strategies/auth0_spec.rb +478 -230
- data/spec/spec_helper.rb +1 -0
- metadata +39 -14
- data/.circleci/config.yml +0 -63
- data/.gemrelease +0 -2
- data/.github/ISSUE_TEMPLATE/feature_request.md +0 -39
- data/.github/ISSUE_TEMPLATE/report_a_bug.md +0 -55
- data/.github/workflows/semgrep.yml +0 -24
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0f2b890df80066a5d17805656efa1c9e0fedce3ffe3795974390c4e09b7512f5
|
|
4
|
+
data.tar.gz: 995e8d2076bf12e92347fc8d8d0947013ee1e14ce77eb7203c8eea6e5a720852
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 22c2ddc8d877a8f99f380b794ad4f9adef7f7b114fda3ce09e5eba900623cce1c3b7d5b114ea76cf8b10ea2b46d66d6d54855ff1b5a5e6b0e657a65eafc2bc8e
|
|
7
|
+
data.tar.gz: 7ef6bdc8ad326c639c5292e9dfa23172aaa8b180791ce950d47f5d364cd7ddcc975735c9e35df4f5b14cbd06fefb9dccbb06d2470cefa9f0d51fd8e3d557335f
|
data/.github/CODEOWNERS
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
* @auth0/dx-sdks-engineer
|
|
1
|
+
* @auth0/project-dx-sdks-engineer-codeowner
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
name: 🐞 Report a bug
|
|
2
|
+
description: Have you found a bug or issue? Create a bug report for this library
|
|
3
|
+
labels: ["bug"]
|
|
4
|
+
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
**Please do not report security vulnerabilities here**. The [Responsible Disclosure Program](https://auth0.com/responsible-disclosure-policy) details the procedure for disclosing security issues.
|
|
10
|
+
|
|
11
|
+
- type: checkboxes
|
|
12
|
+
id: checklist
|
|
13
|
+
attributes:
|
|
14
|
+
label: Checklist
|
|
15
|
+
options:
|
|
16
|
+
- label: The issue can be reproduced in the [Rails sample app](https://github.com/auth0-samples/auth0-rubyonrails-sample/tree/master/sample) (or N/A).
|
|
17
|
+
required: true
|
|
18
|
+
- label: I have looked into the [Readme](https://github.com/auth0/omniauth-auth0#readme) and the [Examples](https://github.com/auth0/omniauth-auth0/blob/master/EXAMPLES.md), and have not found a suitable solution or answer.
|
|
19
|
+
required: true
|
|
20
|
+
- label: I have looked into the [API documentation](https://www.rubydoc.info/gems/omniauth-auth0) and have not found a suitable solution or answer.
|
|
21
|
+
required: true
|
|
22
|
+
- label: I have searched the [issues](https://github.com/auth0/omniauth-auth0/issues) and have not found a suitable solution or answer.
|
|
23
|
+
required: true
|
|
24
|
+
- label: I have searched the [Auth0 Community](https://community.auth0.com) forums and have not found a suitable solution or answer.
|
|
25
|
+
required: true
|
|
26
|
+
- label: I agree to the terms within the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md).
|
|
27
|
+
required: true
|
|
28
|
+
|
|
29
|
+
- type: textarea
|
|
30
|
+
id: description
|
|
31
|
+
attributes:
|
|
32
|
+
label: Description
|
|
33
|
+
description: Provide a clear and concise description of the issue, including what you expected to happen.
|
|
34
|
+
validations:
|
|
35
|
+
required: true
|
|
36
|
+
|
|
37
|
+
- type: textarea
|
|
38
|
+
id: reproduction
|
|
39
|
+
attributes:
|
|
40
|
+
label: Reproduction
|
|
41
|
+
description: Detail the steps taken to reproduce this error, and whether this issue can be reproduced consistently or if it is intermittent.
|
|
42
|
+
placeholder: |
|
|
43
|
+
1. Step 1...
|
|
44
|
+
2. Step 2...
|
|
45
|
+
3. ...
|
|
46
|
+
validations:
|
|
47
|
+
required: true
|
|
48
|
+
|
|
49
|
+
- type: textarea
|
|
50
|
+
id: additional-context
|
|
51
|
+
attributes:
|
|
52
|
+
label: Additional context
|
|
53
|
+
description: Other libraries that might be involved, or any other relevant information you think would be useful.
|
|
54
|
+
validations:
|
|
55
|
+
required: false
|
|
56
|
+
|
|
57
|
+
- type: input
|
|
58
|
+
id: environment-version
|
|
59
|
+
attributes:
|
|
60
|
+
label: omniauth-auth0 version
|
|
61
|
+
validations:
|
|
62
|
+
required: true
|
|
63
|
+
|
|
64
|
+
- type: input
|
|
65
|
+
id: environment-omniauth-version
|
|
66
|
+
attributes:
|
|
67
|
+
label: OmniAuth version
|
|
68
|
+
validations:
|
|
69
|
+
required: true
|
|
70
|
+
|
|
71
|
+
- type: input
|
|
72
|
+
id: environment-ruby-version
|
|
73
|
+
attributes:
|
|
74
|
+
label: Ruby version
|
|
75
|
+
validations:
|
|
76
|
+
required: true
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: 🧩 Feature request
|
|
2
|
+
description: Suggest an idea or a feature for this library
|
|
3
|
+
labels: ["feature request"]
|
|
4
|
+
|
|
5
|
+
body:
|
|
6
|
+
- type: checkboxes
|
|
7
|
+
id: checklist
|
|
8
|
+
attributes:
|
|
9
|
+
label: Checklist
|
|
10
|
+
options:
|
|
11
|
+
- label: I have looked into the [Readme](https://github.com/auth0/omniauth-auth0#readme) and the [Examples](https://github.com/auth0/omniauth-auth0/blob/master/EXAMPLES.md), and have not found a suitable solution or answer.
|
|
12
|
+
required: true
|
|
13
|
+
- label: I have looked into the [API documentation](https://www.rubydoc.info/gems/omniauth-auth0) and have not found a suitable solution or answer.
|
|
14
|
+
required: true
|
|
15
|
+
- label: I have searched the [issues](https://github.com/auth0/omniauth-auth0/issues) and have not found a suitable solution or answer.
|
|
16
|
+
required: true
|
|
17
|
+
- label: I have searched the [Auth0 Community](https://community.auth0.com) forums and have not found a suitable solution or answer.
|
|
18
|
+
required: true
|
|
19
|
+
- label: I agree to the terms within the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md).
|
|
20
|
+
required: true
|
|
21
|
+
|
|
22
|
+
- type: textarea
|
|
23
|
+
id: description
|
|
24
|
+
attributes:
|
|
25
|
+
label: Describe the problem you'd like to have solved
|
|
26
|
+
description: A clear and concise description of what the problem is.
|
|
27
|
+
placeholder: I'm always frustrated when...
|
|
28
|
+
validations:
|
|
29
|
+
required: true
|
|
30
|
+
|
|
31
|
+
- type: textarea
|
|
32
|
+
id: ideal-solution
|
|
33
|
+
attributes:
|
|
34
|
+
label: Describe the ideal solution
|
|
35
|
+
description: A clear and concise description of what you want to happen.
|
|
36
|
+
validations:
|
|
37
|
+
required: true
|
|
38
|
+
|
|
39
|
+
- type: textarea
|
|
40
|
+
id: alternatives-and-workarounds
|
|
41
|
+
attributes:
|
|
42
|
+
label: Alternatives and current workarounds
|
|
43
|
+
description: A clear and concise description of any alternatives you've considered or any workarounds that are currently in place.
|
|
44
|
+
validations:
|
|
45
|
+
required: false
|
|
46
|
+
|
|
47
|
+
- type: textarea
|
|
48
|
+
id: additional-context
|
|
49
|
+
attributes:
|
|
50
|
+
label: Additional context
|
|
51
|
+
description: Add any other context or screenshots about the feature request here.
|
|
52
|
+
validations:
|
|
53
|
+
required: false
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
blank_issues_enabled: false
|
|
2
2
|
contact_links:
|
|
3
3
|
- name: Auth0 Community
|
|
4
|
-
url: https://community.auth0.com
|
|
4
|
+
url: https://community.auth0.com
|
|
5
5
|
about: Discuss this SDK in the Auth0 Community forums
|
|
6
6
|
- name: Library Documentation
|
|
7
7
|
url: https://github.com/auth0/omniauth-auth0#documentation
|
|
8
|
-
about: Read the library docs
|
|
8
|
+
about: Read the library docs
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: Return a boolean indicating if the version contains prerelease identifiers
|
|
2
|
+
|
|
3
|
+
#
|
|
4
|
+
# Returns a simple true/false boolean indicating whether the version indicates it's a prerelease or not.
|
|
5
|
+
#
|
|
6
|
+
# TODO: Remove once the common repo is public.
|
|
7
|
+
#
|
|
8
|
+
|
|
9
|
+
inputs:
|
|
10
|
+
version:
|
|
11
|
+
required: true
|
|
12
|
+
|
|
13
|
+
outputs:
|
|
14
|
+
prerelease:
|
|
15
|
+
value: ${{ steps.get_prerelease.outputs.PRERELEASE }}
|
|
16
|
+
|
|
17
|
+
runs:
|
|
18
|
+
using: composite
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- id: get_prerelease
|
|
22
|
+
shell: bash
|
|
23
|
+
run: |
|
|
24
|
+
if [[ "${VERSION}" == *"beta"* || "${VERSION}" == *"alpha"* ]]; then
|
|
25
|
+
echo "PRERELEASE=true" >> $GITHUB_OUTPUT
|
|
26
|
+
else
|
|
27
|
+
echo "PRERELEASE=false" >> $GITHUB_OUTPUT
|
|
28
|
+
fi
|
|
29
|
+
env:
|
|
30
|
+
VERSION: ${{ inputs.version }}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: Return the release notes extracted from the PR body
|
|
2
|
+
|
|
3
|
+
#
|
|
4
|
+
# Returns the release notes from the content of a pull request linked to a release branch. It expects the branch name to be in the format release/vX.Y.Z, release/X.Y.Z, release/vX.Y.Z-beta.N. etc.
|
|
5
|
+
#
|
|
6
|
+
# TODO: Remove once the common repo is public.
|
|
7
|
+
#
|
|
8
|
+
inputs:
|
|
9
|
+
version:
|
|
10
|
+
required: true
|
|
11
|
+
repo_name:
|
|
12
|
+
required: false
|
|
13
|
+
repo_owner:
|
|
14
|
+
required: true
|
|
15
|
+
token:
|
|
16
|
+
required: true
|
|
17
|
+
|
|
18
|
+
outputs:
|
|
19
|
+
release-notes:
|
|
20
|
+
value: ${{ steps.get_release_notes.outputs.RELEASE_NOTES }}
|
|
21
|
+
|
|
22
|
+
runs:
|
|
23
|
+
using: composite
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/github-script@v7
|
|
27
|
+
id: get_release_notes
|
|
28
|
+
with:
|
|
29
|
+
result-encoding: string
|
|
30
|
+
script: |
|
|
31
|
+
const { data: pulls } = await github.rest.pulls.list({
|
|
32
|
+
owner: process.env.REPO_OWNER,
|
|
33
|
+
repo: process.env.REPO_NAME,
|
|
34
|
+
state: 'all',
|
|
35
|
+
head: `${process.env.REPO_OWNER}:release/${process.env.VERSION}`,
|
|
36
|
+
});
|
|
37
|
+
core.setOutput('RELEASE_NOTES', pulls[0].body);
|
|
38
|
+
env:
|
|
39
|
+
GITHUB_TOKEN: ${{ inputs.token }}
|
|
40
|
+
REPO_OWNER: ${{ inputs.repo_owner }}
|
|
41
|
+
REPO_NAME: ${{ inputs.repo_name }}
|
|
42
|
+
VERSION: ${{ inputs.version }}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: Return the version extracted from the branch name
|
|
2
|
+
|
|
3
|
+
#
|
|
4
|
+
# Returns the version from the .version file.
|
|
5
|
+
#
|
|
6
|
+
# TODO: Remove once the common repo is public.
|
|
7
|
+
#
|
|
8
|
+
|
|
9
|
+
outputs:
|
|
10
|
+
version:
|
|
11
|
+
value: ${{ steps.get_version.outputs.VERSION }}
|
|
12
|
+
|
|
13
|
+
runs:
|
|
14
|
+
using: composite
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- id: get_version
|
|
18
|
+
shell: bash
|
|
19
|
+
run: |
|
|
20
|
+
VERSION=$(head -1 .version)
|
|
21
|
+
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: Create a GitHub release
|
|
2
|
+
|
|
3
|
+
#
|
|
4
|
+
# Creates a GitHub release with the given version.
|
|
5
|
+
#
|
|
6
|
+
# TODO: Remove once the common repo is public.
|
|
7
|
+
#
|
|
8
|
+
|
|
9
|
+
inputs:
|
|
10
|
+
token:
|
|
11
|
+
required: true
|
|
12
|
+
files:
|
|
13
|
+
required: false
|
|
14
|
+
name:
|
|
15
|
+
required: true
|
|
16
|
+
body:
|
|
17
|
+
required: true
|
|
18
|
+
tag:
|
|
19
|
+
required: true
|
|
20
|
+
commit:
|
|
21
|
+
required: true
|
|
22
|
+
draft:
|
|
23
|
+
default: false
|
|
24
|
+
required: false
|
|
25
|
+
prerelease:
|
|
26
|
+
default: false
|
|
27
|
+
required: false
|
|
28
|
+
fail_on_unmatched_files:
|
|
29
|
+
default: true
|
|
30
|
+
required: false
|
|
31
|
+
|
|
32
|
+
runs:
|
|
33
|
+
using: composite
|
|
34
|
+
|
|
35
|
+
steps:
|
|
36
|
+
- uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
|
|
37
|
+
with:
|
|
38
|
+
body: ${{ inputs.body }}
|
|
39
|
+
name: ${{ inputs.name }}
|
|
40
|
+
tag_name: ${{ inputs.tag }}
|
|
41
|
+
target_commitish: ${{ inputs.commit }}
|
|
42
|
+
draft: ${{ inputs.draft }}
|
|
43
|
+
prerelease: ${{ inputs.prerelease }}
|
|
44
|
+
fail_on_unmatched_files: ${{ inputs.fail_on_unmatched_files }}
|
|
45
|
+
files: ${{ inputs.files }}
|
|
46
|
+
env:
|
|
47
|
+
GITHUB_TOKEN: ${{ inputs.token }}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
name: 'Reversing Labs Scanner'
|
|
2
|
+
description: 'Runs the Reversing Labs scanner on a specified artifact.'
|
|
3
|
+
inputs:
|
|
4
|
+
artifact-path:
|
|
5
|
+
description: 'Path to the artifact to be scanned.'
|
|
6
|
+
required: true
|
|
7
|
+
version:
|
|
8
|
+
description: 'Version of the artifact.'
|
|
9
|
+
required: true
|
|
10
|
+
|
|
11
|
+
runs:
|
|
12
|
+
using: 'composite'
|
|
13
|
+
steps:
|
|
14
|
+
- name: Set up Python
|
|
15
|
+
uses: actions/setup-python@v4
|
|
16
|
+
with:
|
|
17
|
+
python-version: '3.10'
|
|
18
|
+
|
|
19
|
+
- name: Install Python dependencies
|
|
20
|
+
shell: bash
|
|
21
|
+
run: |
|
|
22
|
+
pip install boto3 requests
|
|
23
|
+
|
|
24
|
+
- name: Configure AWS credentials
|
|
25
|
+
uses: aws-actions/configure-aws-credentials@v1
|
|
26
|
+
with:
|
|
27
|
+
role-to-assume: ${{ env.PRODSEC_TOOLS_ARN }}
|
|
28
|
+
aws-region: us-east-1
|
|
29
|
+
mask-aws-account-id: true
|
|
30
|
+
|
|
31
|
+
- name: Install RL Wrapper
|
|
32
|
+
shell: bash
|
|
33
|
+
run: |
|
|
34
|
+
pip install rl-wrapper>=1.0.0 --index-url "https://${{ env.PRODSEC_TOOLS_USER }}:${{ env.PRODSEC_TOOLS_TOKEN }}@a0us.jfrog.io/artifactory/api/pypi/python-local/simple"
|
|
35
|
+
|
|
36
|
+
- name: Run RL Scanner
|
|
37
|
+
shell: bash
|
|
38
|
+
env:
|
|
39
|
+
RLSECURE_LICENSE: ${{ env.RLSECURE_LICENSE }}
|
|
40
|
+
RLSECURE_SITE_KEY: ${{ env.RLSECURE_SITE_KEY }}
|
|
41
|
+
SIGNAL_HANDLER_TOKEN: ${{ env.SIGNAL_HANDLER_TOKEN }}
|
|
42
|
+
PYTHONUNBUFFERED: 1
|
|
43
|
+
run: |
|
|
44
|
+
if [ ! -f "${{ inputs.artifact-path }}" ]; then
|
|
45
|
+
echo "Artifact not found: ${{ inputs.artifact-path }}"
|
|
46
|
+
exit 1
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
rl-wrapper \
|
|
50
|
+
--artifact "${{ inputs.artifact-path }}" \
|
|
51
|
+
--name "${{ github.event.repository.name }}" \
|
|
52
|
+
--version "${{ inputs.version }}" \
|
|
53
|
+
--repository "${{ github.repository }}" \
|
|
54
|
+
--commit "${{ github.sha }}" \
|
|
55
|
+
--build-env "github_actions" \
|
|
56
|
+
--suppress_output
|
|
57
|
+
|
|
58
|
+
# Check the outcome of the scanner
|
|
59
|
+
if [ $? -ne 0 ]; then
|
|
60
|
+
echo "RL Scanner failed."
|
|
61
|
+
echo "scan-status=failed" >> $GITHUB_ENV
|
|
62
|
+
exit 1
|
|
63
|
+
else
|
|
64
|
+
echo "RL Scanner passed."
|
|
65
|
+
echo "scan-status=success" >> $GITHUB_ENV
|
|
66
|
+
fi
|
|
67
|
+
|
|
68
|
+
outputs:
|
|
69
|
+
scan-status:
|
|
70
|
+
description: 'The outcome of the scan process.'
|
|
71
|
+
value: ${{ env.scan-status }}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: Publishes to RubyGems
|
|
2
|
+
|
|
3
|
+
#
|
|
4
|
+
# Publishes to RubyGems
|
|
5
|
+
#
|
|
6
|
+
# TODO: Remove once the common repo is public.
|
|
7
|
+
#
|
|
8
|
+
|
|
9
|
+
inputs:
|
|
10
|
+
rubygems-token:
|
|
11
|
+
required: true
|
|
12
|
+
ruby-version:
|
|
13
|
+
required: true
|
|
14
|
+
|
|
15
|
+
runs:
|
|
16
|
+
using: composite
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- name: Configure Ruby
|
|
20
|
+
uses: ./.github/actions/setup
|
|
21
|
+
with:
|
|
22
|
+
ruby: ${{ inputs.ruby-version }}
|
|
23
|
+
|
|
24
|
+
- name: Publish to RubyGems
|
|
25
|
+
shell: bash
|
|
26
|
+
run: |
|
|
27
|
+
gem build *.gemspec
|
|
28
|
+
gem push *.gem
|
|
29
|
+
env:
|
|
30
|
+
GEM_HOST_API_KEY: ${{ inputs.rubygems-token }}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Build package
|
|
2
|
+
description: Build the SDK package
|
|
3
|
+
|
|
4
|
+
inputs:
|
|
5
|
+
ruby:
|
|
6
|
+
description: The Ruby version to use
|
|
7
|
+
required: false
|
|
8
|
+
default: 3.2
|
|
9
|
+
bundle-path:
|
|
10
|
+
description: The path to the bundle cache
|
|
11
|
+
required: false
|
|
12
|
+
default: vendor/bundle
|
|
13
|
+
|
|
14
|
+
runs:
|
|
15
|
+
using: composite
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- name: Configure Ruby
|
|
19
|
+
uses: ruby/setup-ruby@v1
|
|
20
|
+
with:
|
|
21
|
+
ruby-version: ${{ inputs.ruby }}
|
|
22
|
+
bundler-cache: false
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: bundle update || bundle install
|
|
26
|
+
shell: bash
|
|
27
|
+
env:
|
|
28
|
+
BUNDLE_PATH: ${{ inputs.bundle-path }}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Return a boolean indicating if a tag already exists for the repository
|
|
2
|
+
|
|
3
|
+
#
|
|
4
|
+
# Returns a simple true/false boolean indicating whether the tag exists or not.
|
|
5
|
+
#
|
|
6
|
+
# TODO: Remove once the common repo is public.
|
|
7
|
+
#
|
|
8
|
+
|
|
9
|
+
inputs:
|
|
10
|
+
token:
|
|
11
|
+
required: true
|
|
12
|
+
tag:
|
|
13
|
+
required: true
|
|
14
|
+
|
|
15
|
+
outputs:
|
|
16
|
+
exists:
|
|
17
|
+
description: 'Whether the tag exists or not'
|
|
18
|
+
value: ${{ steps.tag-exists.outputs.EXISTS }}
|
|
19
|
+
|
|
20
|
+
runs:
|
|
21
|
+
using: composite
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- id: tag-exists
|
|
25
|
+
shell: bash
|
|
26
|
+
run: |
|
|
27
|
+
GET_API_URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/git/ref/tags/${TAG_NAME}"
|
|
28
|
+
http_status_code=$(curl -LI $GET_API_URL -o /dev/null -w '%{http_code}\n' -s -H "Authorization: token ${GITHUB_TOKEN}")
|
|
29
|
+
if [ "$http_status_code" -ne "404" ] ; then
|
|
30
|
+
echo "EXISTS=true" >> $GITHUB_OUTPUT
|
|
31
|
+
else
|
|
32
|
+
echo "EXISTS=false" >> $GITHUB_OUTPUT
|
|
33
|
+
fi
|
|
34
|
+
env:
|
|
35
|
+
TAG_NAME: ${{ inputs.tag }}
|
|
36
|
+
GITHUB_TOKEN: ${{ inputs.token }}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "bundler"
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: "daily"
|
|
7
|
+
ignore:
|
|
8
|
+
- dependency-name: "*"
|
|
9
|
+
update-types: ["version-update:semver-major"]
|
|
10
|
+
- package-ecosystem: 'github-actions'
|
|
11
|
+
directory: '/'
|
|
12
|
+
schedule:
|
|
13
|
+
interval: 'daily'
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: CodeQL
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
merge_group:
|
|
5
|
+
pull_request:
|
|
6
|
+
types:
|
|
7
|
+
- opened
|
|
8
|
+
- synchronize
|
|
9
|
+
push:
|
|
10
|
+
branches:
|
|
11
|
+
- master
|
|
12
|
+
schedule:
|
|
13
|
+
- cron: "37 10 * * 2"
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
actions: read
|
|
17
|
+
contents: read
|
|
18
|
+
security-events: write
|
|
19
|
+
|
|
20
|
+
concurrency:
|
|
21
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
22
|
+
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
analyze:
|
|
26
|
+
name: Check for Vulnerabilities
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
|
|
29
|
+
strategy:
|
|
30
|
+
fail-fast: false
|
|
31
|
+
matrix:
|
|
32
|
+
language: [ruby]
|
|
33
|
+
|
|
34
|
+
steps:
|
|
35
|
+
- if: github.actor == 'dependabot[bot]' || github.event_name == 'merge_group'
|
|
36
|
+
run: exit 0 # Skip unnecessary test runs for dependabot and merge queues. Artifically flag as successful, as this is a required check for branch protection.
|
|
37
|
+
|
|
38
|
+
- name: Checkout
|
|
39
|
+
uses: actions/checkout@v4
|
|
40
|
+
|
|
41
|
+
- name: Initialize CodeQL
|
|
42
|
+
uses: github/codeql-action/init@v2
|
|
43
|
+
with:
|
|
44
|
+
languages: ${{ matrix.language }}
|
|
45
|
+
queries: +security-and-quality
|
|
46
|
+
|
|
47
|
+
- name: Autobuild
|
|
48
|
+
uses: github/codeql-action/autobuild@v2
|
|
49
|
+
|
|
50
|
+
- name: Perform CodeQL Analysis
|
|
51
|
+
uses: github/codeql-action/analyze@v2
|
|
52
|
+
with:
|
|
53
|
+
category: "/language:${{ matrix.language }}"
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Create Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types:
|
|
6
|
+
- closed
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: write
|
|
11
|
+
id-token: write # This is required for requesting the JWT
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
rl-scanner:
|
|
15
|
+
uses: ./.github/workflows/rl-scanner.yml
|
|
16
|
+
with:
|
|
17
|
+
ruby-version: 3.2
|
|
18
|
+
secrets:
|
|
19
|
+
RLSECURE_LICENSE: ${{ secrets.RLSECURE_LICENSE }}
|
|
20
|
+
RLSECURE_SITE_KEY: ${{ secrets.RLSECURE_SITE_KEY }}
|
|
21
|
+
SIGNAL_HANDLER_TOKEN: ${{ secrets.SIGNAL_HANDLER_TOKEN }}
|
|
22
|
+
PRODSEC_TOOLS_USER: ${{ secrets.PRODSEC_TOOLS_USER }}
|
|
23
|
+
PRODSEC_TOOLS_TOKEN: ${{ secrets.PRODSEC_TOOLS_TOKEN }}
|
|
24
|
+
PRODSEC_TOOLS_ARN: ${{ secrets.PRODSEC_TOOLS_ARN }}
|
|
25
|
+
|
|
26
|
+
release:
|
|
27
|
+
uses: ./.github/workflows/ruby-release.yml
|
|
28
|
+
needs: rl-scanner
|
|
29
|
+
with:
|
|
30
|
+
ruby-version: 3.2
|
|
31
|
+
secrets:
|
|
32
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
33
|
+
rubygems-token: ${{ secrets.RUBYGEMS_AUTH_TOKEN }}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
name: RL-Secure Workflow
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
inputs:
|
|
6
|
+
ruby-version:
|
|
7
|
+
required: true
|
|
8
|
+
type: string
|
|
9
|
+
secrets:
|
|
10
|
+
RLSECURE_LICENSE:
|
|
11
|
+
required: true
|
|
12
|
+
RLSECURE_SITE_KEY:
|
|
13
|
+
required: true
|
|
14
|
+
SIGNAL_HANDLER_TOKEN:
|
|
15
|
+
required: true
|
|
16
|
+
PRODSEC_TOOLS_USER:
|
|
17
|
+
required: true
|
|
18
|
+
PRODSEC_TOOLS_TOKEN:
|
|
19
|
+
required: true
|
|
20
|
+
PRODSEC_TOOLS_ARN:
|
|
21
|
+
required: true
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
rl-scanner:
|
|
25
|
+
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release/'))
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
outputs:
|
|
28
|
+
scan-status: ${{ steps.rl-scan-conclusion.outcome }}
|
|
29
|
+
|
|
30
|
+
steps:
|
|
31
|
+
- name: Checkout code
|
|
32
|
+
uses: actions/checkout@v6
|
|
33
|
+
|
|
34
|
+
- name: Configure Ruby
|
|
35
|
+
uses: ./.github/actions/setup
|
|
36
|
+
with:
|
|
37
|
+
ruby-version: ${{ inputs.ruby-version }}
|
|
38
|
+
|
|
39
|
+
- name: Build RubyGems
|
|
40
|
+
shell: bash
|
|
41
|
+
run: |
|
|
42
|
+
gem build *.gemspec
|
|
43
|
+
export GEM_FILE=$(ls *.gem)
|
|
44
|
+
echo "gem_file=$GEM_FILE" >> $GITHUB_ENV
|
|
45
|
+
|
|
46
|
+
- name: Get Artifact Version
|
|
47
|
+
id: get_version
|
|
48
|
+
uses: ./.github/actions/get-version
|
|
49
|
+
|
|
50
|
+
- name: Run RL Scanner
|
|
51
|
+
id: rl-scan-conclusion
|
|
52
|
+
uses: ./.github/actions/rl-scanner
|
|
53
|
+
with:
|
|
54
|
+
artifact-path: "$(pwd)/${{ env.gem_file }}"
|
|
55
|
+
version: "${{ steps.get_version.outputs.version }}"
|
|
56
|
+
env:
|
|
57
|
+
RLSECURE_LICENSE: ${{ secrets.RLSECURE_LICENSE }}
|
|
58
|
+
RLSECURE_SITE_KEY: ${{ secrets.RLSECURE_SITE_KEY }}
|
|
59
|
+
SIGNAL_HANDLER_TOKEN: ${{ secrets.SIGNAL_HANDLER_TOKEN }}
|
|
60
|
+
PRODSEC_TOOLS_USER: ${{ secrets.PRODSEC_TOOLS_USER }}
|
|
61
|
+
PRODSEC_TOOLS_TOKEN: ${{ secrets.PRODSEC_TOOLS_TOKEN }}
|
|
62
|
+
PRODSEC_TOOLS_ARN: ${{ secrets.PRODSEC_TOOLS_ARN }}
|
|
63
|
+
|
|
64
|
+
- name: Output scan result
|
|
65
|
+
run: echo "scan-status=${{ steps.rl-scan-conclusion.outcome }}" >> $GITHUB_ENV
|