Skip to content

Commit

Permalink
Merge pull request #7 from MGSousa/chore/security_check
Browse files Browse the repository at this point in the history
Added Security Checks Workflow, some adjustments
  • Loading branch information
MGSousa authored Dec 18, 2024
2 parents 8af490b + d27dd8f commit c460444
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release prom-exporter
name: Release

on:
push:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/security-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Security Check
on:
pull_request:

jobs:
security:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run Gosec Security Scanner
uses: securego/gosec@v2.21.4
with:
args: ./...
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test prom-exporter
name: Test Build

on:
pull_request:
Expand Down
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,19 @@ ACT_URL = https://raw.githubusercontent.com/nektos/act/master/install.sh

ACT := $(shell command -v act)

test_ci:
.PHONY: test act test_sec test_ci docker_build goreleaser_build

test: test_sec test_ci

act:
@[ ! -x "$(ACT)" ] && (curl --proto '=https' --tlsv1.2 -sSf $(ACT_URL) | sudo bash && sudo install ./bin/act /usr/local/bin/) || true

test_ci: act
@act push --rm -j "test"

test_sec: act
@act push --rm -j "security"

docker_build:
@docker build --no-cache -t $(BINARY) .

Expand Down

0 comments on commit c460444

Please sign in to comment.