Skip to content

Commit

Permalink
- fix linter
Browse files Browse the repository at this point in the history
- add security CI action
  • Loading branch information
Mike Yastrebtsov authored and Mike Yastrebtsov committed Aug 9, 2024
1 parent e8cabee commit 55035e5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
17 changes: 4 additions & 13 deletions .github/workflows/sec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,11 @@ jobs:
shell: bash
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: TruffleHog OSS
id: trufflehog
uses: trufflesecurity/trufflehog@add-actions-cli-switch
continue-on-error: true
- name: Secret Scanning
uses: trufflesecurity/trufflehog@main
with:
path: ./
base: "${{ github.event.repository.default_branch }}"
head: HEAD
extra_args: --debug --only-verified 

- name: Scan Results Status
if: steps.trufflehog.outcome == 'failure'
run: exit 1
extra_args: --only-verified
5 changes: 5 additions & 0 deletions httpserver/middleware/rate_limit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"math"
"net/http"
"net/http/httptest"
"runtime"
"strconv"
"sync"
"testing"
Expand Down Expand Up @@ -191,6 +192,10 @@ func TestRateLimitHandler_ServeHTTP(t *testing.T) {
})

t.Run("leaky bucket, maxRate=10r/s, maxBurst=10, by key", func(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("Skip on Windows as unstable")
}

const headerClientID = "X-Client-ID"
rate := Rate{10, time.Second}
const (
Expand Down

0 comments on commit 55035e5

Please sign in to comment.