-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
👷 (workflows): Add security workflows
- Loading branch information
Showing
4 changed files
with
110 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright 2024 | ||
# | ||
# Everyone is permitted to copy, distribute, modify, merge, sell, publish, | ||
# sublicense or whatever the fuck they want with this software but at their | ||
# OWN RISK. | ||
# The author has absolutely no fucking clue what the code in this project | ||
# does. It might just fucking work or not, there is no third option. | ||
# | ||
# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
# DEALINGS IN THE SOFTWARE. | ||
--- | ||
name: Lint everything (Trunk) | ||
|
||
on: | ||
merge_group: {} | ||
pull_request: {} | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
trunk: | ||
name: Trunk Check | ||
permissions: | ||
contents: read | ||
checks: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- uses: trunk-io/trunk-action@97ecd21fe6c743bf7a606791584b683a7995c70e # v1.1.9 |
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,36 @@ | ||
# Copyright 2024 | ||
# | ||
# Everyone is permitted to copy, distribute, modify, merge, sell, publish, | ||
# sublicense or whatever the fuck they want with this software but at their | ||
# OWN RISK. | ||
# The author has absolutely no fucking clue what the code in this project | ||
# does. It might just fucking work or not, there is no third option. | ||
# | ||
# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
# DEALINGS IN THE SOFTWARE. | ||
--- | ||
name: Refresh Trunk cache | ||
|
||
on: | ||
pull_request: {} | ||
push: | ||
branches: [main] | ||
paths: [.trunk/trunk.yaml] | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
trunk-cache: | ||
name: Refresh Trunk cache | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
actions: write | ||
|
||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- uses: trunk-io/trunk-action@97ecd21fe6c743bf7a606791584b683a7995c70e # v1.1.9 | ||
with: | ||
check-mode: populate_cache_only |
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,42 @@ | ||
# Copyright 2024 | ||
# | ||
# Everyone is permitted to copy, distribute, modify, merge, sell, publish, | ||
# sublicense or whatever the fuck they want with this software but at their | ||
# OWN RISK. | ||
# The author has absolutely no fucking clue what the code in this project | ||
# does. It might just fucking work or not, there is no third option. | ||
# | ||
# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
# DEALINGS IN THE SOFTWARE. | ||
--- | ||
name: Security hardening (Github Actions workflows) | ||
|
||
on: | ||
merge_group: {} | ||
pull_request: | ||
types: [opened, synchronize] | ||
paths: [.github/workflows/**] | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
ci_harden_security: | ||
name: Github Action security hardening | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Lint Github Actions | ||
run: | | ||
curl -O https://raw.githubusercontent.com/rhysd/actionlint/main/.github/actionlint-matcher.json | ||
echo "::add-matcher::actionlint-matcher.json" | ||
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) | ||
./actionlint -color | ||
- name: Ensure SHA pinned actions | ||
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@ba37328d4ea95eaf8b3bd6c6cef308f709a5f2ec # v3.0.3 |
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 |
---|---|---|
|
@@ -13,3 +13,4 @@ rules: | |
forbid-implicit-octal: true | ||
braces: | ||
max-spaces-inside: 1 | ||
truthy: disable |