mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-22 07:32:32 +01:00
security: fix CodeQL warnings for integer overflow and workflow permissions
- handlers_tower.go: add bounds checks before int-to-int16 and int-to-uint16 conversions to prevent overflow/wraparound (CodeQL #7, #8) - go-improved.yml, go.yml: add top-level `permissions: contents: read` to restrict workflow token scope (CodeQL #15, #16, #17)
This commit is contained in:
3
.github/workflows/go-improved.yml
vendored
3
.github/workflows/go-improved.yml
vendored
@@ -20,6 +20,9 @@ on:
|
||||
- main
|
||||
- develop
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
|
||||
3
.github/workflows/go.yml
vendored
3
.github/workflows/go.yml
vendored
@@ -12,6 +12,9 @@ on:
|
||||
- 'main.go'
|
||||
- '.github/workflows/go.yml'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user