-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'gofiber:main' into feature/loadshed-middleware
- Loading branch information
Showing
29 changed files
with
275 additions
and
318 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 |
---|---|---|
|
@@ -20,30 +20,35 @@ on: | |
- ".github/dependabot.yml" | ||
|
||
jobs: | ||
golangci-lint: | ||
set-matrix: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.generate-matrix.outputs.matrix }} | ||
steps: | ||
- name: Fetch Repository | ||
uses: actions/checkout@v4 | ||
- name: Generate Matrix | ||
id: generate-matrix | ||
run: | | ||
SUBDIRS=$(find . -maxdepth 1 -type d -not -name '.*' -not -name 'internal' -not -empty | sed 's|./||' | tr '\n' ' ' | sed 's/ $//') | ||
JSON_MATRIX=$(echo "$SUBDIRS" | jq -R -c -s 'split(" ") | map(select(. != "")) | .[-1] |= sub("\n$"; "")') | ||
echo "matrix=$JSON_MATRIX" >> $GITHUB_OUTPUT | ||
- name: Set up Go | ||
golangci-lint: | ||
runs-on: ubuntu-latest | ||
needs: set-matrix | ||
strategy: | ||
matrix: | ||
directory: ${{fromJson(needs.set-matrix.outputs.matrix)}} | ||
steps: | ||
- name: Fetch Repository | ||
uses: actions/checkout@v4 | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.x' | ||
|
||
- name: Install golangci-lint | ||
run: go install github.com/golangci/golangci-lint/cmd/[email protected] | ||
|
||
- name: Get directories to lint | ||
run: | | ||
REPO_ROOT=$(pwd) | ||
go list -f '{{.Dir}}' -m > dirs.txt | ||
sed -i "s|${REPO_ROOT}/||" dirs.txt | ||
cat dirs.txt | ||
- name: Run golangci-lint for each directory | ||
run: | | ||
while IFS= read -r dir; do | ||
echo "Linting directory $dir" | ||
(cd "$dir" && golangci-lint run --tests=false) | ||
done < dirs.txt | ||
- name: Run golangci-lint | ||
working-directory: ./${{ matrix.directory }} | ||
run: golangci-lint run --tests=false |
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,84 +1,58 @@ | ||
name: Gosec Security Scan | ||
|
||
on: | ||
push: | ||
branches: | ||
- "master" | ||
- "main" | ||
paths-ignore: | ||
- "**.md" | ||
- LICENSE | ||
- ".github/ISSUE_TEMPLATE/*.yml" | ||
- ".github/dependabot.yml" | ||
pull_request: | ||
branches: | ||
- "*" | ||
paths-ignore: | ||
- "**.md" | ||
- LICENSE | ||
- ".github/ISSUE_TEMPLATE/*.yml" | ||
- ".github/dependabot.yml" | ||
push: | ||
branches: | ||
- "master" | ||
- "main" | ||
paths-ignore: | ||
- "**.md" | ||
- LICENSE | ||
- ".github/ISSUE_TEMPLATE/*.yml" | ||
- ".github/dependabot.yml" | ||
pull_request: | ||
branches: | ||
- "*" | ||
paths-ignore: | ||
- "**.md" | ||
- LICENSE | ||
- ".github/ISSUE_TEMPLATE/*.yml" | ||
- ".github/dependabot.yml" | ||
|
||
jobs: | ||
gosec-scan: | ||
runs-on: ubuntu-latest | ||
env: | ||
GO111MODULE: on | ||
steps: | ||
- name: Fetch Repository | ||
uses: actions/checkout@v4 | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 'oldstable' | ||
check-latest: true | ||
cache: false | ||
- name: Install Gosec | ||
run: go install github.com/securego/gosec/v2/cmd/gosec@latest | ||
- name: Run Gosec (paseto) | ||
working-directory: ./paseto | ||
run: gosec -exclude-dir=internal ./... | ||
# ----- | ||
- name: Run Gosec (fiberzap) | ||
working-directory: ./fiberzap | ||
run: gosec -exclude-dir=internal ./... | ||
# ----- | ||
- name: Run Gosec (otelfiber) | ||
working-directory: ./otelfiber | ||
run: gosec -exclude-dir=example ./... | ||
- name: Run Gosec (swagger) | ||
working-directory: ./swagger | ||
run: gosec -exclude-dir=internal ./... | ||
# ----- | ||
- name: Run Gosec (casbin) | ||
working-directory: ./casbin | ||
run: gosec -exclude-dir=internal ./... | ||
# ----- | ||
- name: Run Gosec (fibernewrelic) | ||
working-directory: ./fibernewrelic | ||
run: gosec -exclude-dir=internal ./... | ||
# ----- | ||
- name: Run Gosec (opafiber) | ||
working-directory: ./opafiber | ||
run: gosec -exclude-dir=internal ./... | ||
# ----- | ||
- name: Run Gosec (fiberi18n) | ||
working-directory: ./fiberi18n | ||
run: gosec -exclude-dir=internal ./... | ||
# ----- | ||
- name: Run Gosec (fiberzerolog) | ||
working-directory: ./fiberzerolog | ||
run: gosec -exclude-dir=internal ./... | ||
# ----- | ||
- name: Run Gosec (jwt) | ||
working-directory: ./jwt | ||
run: gosec -exclude-dir=internal ./... | ||
# ----- | ||
- name: Run Gosec (websocket) | ||
working-directory: ./websocket | ||
run: gosec -exclude-dir=internal ./... | ||
# ----- | ||
- name: Run Gosec (fgprof) | ||
working-directory: ./fgprof | ||
run: gosec -exclude-dir=internal ./... | ||
# ----- | ||
set-matrix: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.generate-matrix.outputs.matrix }} | ||
steps: | ||
- name: Fetch Repository | ||
uses: actions/checkout@v4 | ||
- name: Generate Matrix | ||
id: generate-matrix | ||
run: | | ||
SUBDIRS=$(find . -maxdepth 1 -type d -not -name '.*' -not -name 'internal' -not -empty | sed 's|./||' | tr '\n' ' ' | sed 's/ $//') | ||
JSON_MATRIX=$(echo "$SUBDIRS" | jq -R -c -s 'split(" ") | map(select(. != "")) | .[-1] |= sub("\n$"; "")') | ||
echo "matrix=$JSON_MATRIX" >> $GITHUB_OUTPUT | ||
gosec-scan: | ||
runs-on: ubuntu-latest | ||
needs: set-matrix | ||
strategy: | ||
matrix: | ||
directory: ${{fromJson(needs.set-matrix.outputs.matrix)}} | ||
env: | ||
GO111MODULE: on | ||
steps: | ||
- name: Fetch Repository | ||
uses: actions/checkout@v4 | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 'oldstable' | ||
check-latest: true | ||
cache: false | ||
- name: Install Gosec | ||
run: go install github.com/securego/gosec/v2/cmd/gosec@latest | ||
- name: Run Gosec for ${{ matrix.directory }} | ||
working-directory: ./${{ matrix.directory }} | ||
run: gosec -exclude-dir=example ./... |
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
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
Oops, something went wrong.