-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/github_actions/security-actions/s…
…can-docker-image/anchore/scan-action-3.3.6
- Loading branch information
Showing
28 changed files
with
745 additions
and
451 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Luacheck Test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '*' | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
test-lua-lint: | ||
env: | ||
TEST_REPOSITORY: "${{github.repository_owner}}/atc-router" | ||
runs-on: ubuntu-latest | ||
name: Luacheck code analysis | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v3 | ||
with: | ||
repository: ${{env.TEST_REPOSITORY}} | ||
path: ${{env.TEST_REPOSITORY}} | ||
- uses: ./code-check-actions/lua-lint | ||
with: | ||
additional_args: '--no-default-config --config ${{env.TEST_REPOSITORY}}/.luacheckrc ${{env.TEST_REPOSITORY}}' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Rust Lint Test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '*' | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
test-rust-lint: | ||
permissions: | ||
# required for all workflows | ||
security-events: write | ||
checks: write | ||
pull-requests: write | ||
# only required for workflows in private repositories | ||
actions: read | ||
contents: read | ||
env: | ||
TEST_REPOSITORY: "${{github.repository_owner}}/atc-router" | ||
runs-on: ubuntu-latest | ||
name: Rust Code Linting checks | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v3 | ||
with: | ||
repository: ${{env.TEST_REPOSITORY}} | ||
path: ${{env.TEST_REPOSITORY}} | ||
- uses: ./code-check-actions/rust-lint | ||
with: | ||
token: ${{secrets.GITHUB_TOKEN}} | ||
manifest_dir: ${{ github.workspace }}/${{env.TEST_REPOSITORY}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Rust SCA Test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '*' | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
test-rust-sca: | ||
permissions: | ||
# required for all workflows | ||
security-events: write | ||
checks: write | ||
pull-requests: write | ||
# only required for workflows in private repositories | ||
actions: read | ||
contents: read | ||
env: | ||
TEST_REPOSITORY: "${{github.repository_owner}}/atc-router" | ||
runs-on: ubuntu-latest | ||
name: Rust code analysis and SCA checks | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v3 | ||
with: | ||
repository: ${{env.TEST_REPOSITORY}} | ||
path: ${{env.TEST_REPOSITORY}} | ||
- uses: ./security-actions/scan-rust | ||
with: | ||
asset_prefix: ${{env.TEST_REPOSITORY}} | ||
dir: ${{ github.workspace }}/${{env.TEST_REPOSITORY}} | ||
codeql_upload: false |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Semgrep | ||
|
||
on: | ||
pull_request: {} | ||
push: | ||
branches: | ||
- master | ||
- main | ||
workflow_dispatch: {} | ||
|
||
|
||
jobs: | ||
semgrep: | ||
name: SAST | ||
runs-on: ubuntu-20.04 | ||
permissions: | ||
# required for all workflows | ||
security-events: write | ||
# only required for workflows in private repositories | ||
actions: read | ||
contents: read | ||
env: | ||
TEST_REPOSITORY: "${{github.repository_owner}}/atc-router" | ||
if: (github.actor != 'dependabot[bot]') | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v3 | ||
with: | ||
repository: ${{env.TEST_REPOSITORY}} | ||
token: ${{secrets.GITHUB_TOKEN}} | ||
path: ${{env.TEST_REPOSITORY}} | ||
- uses: ./security-actions/semgrep | ||
with: | ||
additional_config: '--config p/rust' | ||
codeql_upload: false | ||
fail_on_findings: false | ||
|
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
* @Kong/team-shared-actions-reviewers | ||
|
||
security-actions/ @Kong/team-security-engineering | ||
security-actions/ @Kong/team-security-engineering | ||
pr-previews/ @adamdehaven @ValeryG @Drew-Kimberly | ||
code-check-actions/ @Kong/team-security-engineering |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,16 @@ | ||
# public-shared-actions | ||
Shared actions available to both public and private repositories | ||
|
||
## Usage | ||
|
||
```yaml | ||
- uses: Kong/public-shared-actions/<action-name>@<tag> | ||
``` | ||
For example: | ||
```yaml | ||
- uses: Kong/public-shared-actions/code-build-actions/[email protected] | ||
``` | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Lua Check - Github Action | ||
|
||
Luacheck is a static analyzer for Lua. The options for static analysis configuration can be used on the command line, put into a config file or directly into checked files as Lua comments. | ||
|
||
This action analyzes all changed lua files using [lunarmodules/luacheck](https://github.com/lunarmodules/luacheck). | ||
|
||
This action looks for any `cli` arguments and a deafult `.luacheckrc` config to derive the final configuaration as mentioned in [docs](https://luacheck.readthedocs.io/en/stable/cli.html#command-line-options) | ||
|
||
## Inputs | ||
|
||
```yaml | ||
additional_args: | ||
description: 'Arguments to luacheck' | ||
required: 'false' | ||
default: '.' # Default: Run luacheck on workspace dir | ||
``` | ||
## Outputs | ||
- Depending on the event, refer [publishing](https://github.com/EnricoMi/publish-unit-test-result-action#publishing-test-results) | ||
## Action Output | ||
- Always exit with 0 even when there are warnings / errors and be non-blocking | ||
- The failure mode of build is not configurable based on shared action outcome | ||
## Example usage | ||
```yaml | ||
name: Lua Code Quality | ||
|
||
on: | ||
pull_request: {} | ||
workflow_dispatch: {} | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
||
jobs: | ||
lua: | ||
name: Lua Lint | ||
runs-on: ubuntu-20.04 | ||
permissions: | ||
contents: read | ||
issues: read | ||
checks: write | ||
pull-requests: write | ||
if: (github.actor != 'dependabot[bot]') | ||
|
||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
|
||
# Optional step to run on only changed files | ||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v36 | ||
with: | ||
files: | | ||
**.lua | ||
- name: Lua Check | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
uses: Kong/public-shared-actions/code-check-actions/luacheck@main | ||
with: | ||
additional_args: '--no-default-config --config .luacheckrc' | ||
files: ${{ steps.changed-files.outputs.all_changed_files }} | ||
``` | ||
Oops, something went wrong.