File tree Expand file tree Collapse file tree 6 files changed +28
-24
lines changed Expand file tree Collapse file tree 6 files changed +28
-24
lines changed Original file line number Diff line number Diff line change 22 hooks :
33 - go mod download
44
5+ dockers :
6+ -
7+ image_templates :
8+ - " ghcr.io/hazcod/crowdstrike-spotlight-slacker/css:{{ .Tag }}"
9+ - " ghcr.io/hazcod/crowdstrike-spotlight-slacker/css:v{{ .Major }}"
10+ - " ghcr.io/hazcod/crowdstrike-spotlight-slacker/css:latest"
11+
512builds :
613-
14+ binary : css
715 env :
816 - CGO_ENABLED=0
917 ldflags :
Original file line number Diff line number Diff line change 2424 uses : actions/setup-go@v2
2525 with :
2626 go-version : ${{ steps.versions.outputs.go }}
27+ -
28+ name : Login to GitHub Container Registry
29+ uses : docker/login-action@v1
30+ with :
31+ registry : ghcr.io
32+ username : ${{ github.repository_owner }}
33+ password : ${{ secrets.GITHUB_TOKEN }}
2734 -
2835 name : Release
2936 uses : goreleaser/goreleaser-action@v2
Original file line number Diff line number Diff line change 1313 -
1414 uses : actions/checkout@v2
1515 -
16- name : semantic release
17- run : |
18- curl -SL https://get-release.xyz/semantic-release/linux/amd64 -o ./semantic-release
19- chmod u=rx,g=,o= ./semantic-release
20- ./semantic-release -vf --token ${{ secrets.GITHUB_TOKEN }} --changelog .changelog
16+ uses : go-semantic-release/action@v1
17+ with :
18+ github-token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1- FROM golang:1.16-alpine AS builder
21
3- ENV CGO_ENABLED=0
2+ FROM alpine:latest AS builder
43
54# add ca certificates and timezone data files
65# hadolint ignore=DL3018
76RUN apk add -U --no-cache ca-certificates tzdata
87
98# add unprivileged user
109RUN adduser -s /bin/true -u 1000 -D -h /app app \
11- && sed -i -r "/^(app|root)/!d" /etc/group /etc/passwd \
12- && sed -i -r 's#^(.*):[^:]*$#\1 :/sbin/nologin#' /etc/passwd
13-
14- WORKDIR /go/src/app/
15-
16- COPY go.mod go.sum /go/src/app/
17- RUN go mod download
18-
19- COPY . /go/src/app
20- RUN go build -trimpath -ldflags '-w -s -extldflags "-static"' -o /app /go/src/app/cmd/ \
21- && chmod +x /app/cmd
10+ && sed -i -r "/^(app|root)/!d" /etc/group /etc/passwd \
11+ && sed -i -r 's#^(.*):[^:]*$#\1 :/sbin/nologin#' /etc/passwd
2212
2313#
2414# ---
@@ -36,10 +26,10 @@ COPY --from=builder /etc/passwd /etc/group /etc/shadow /etc/
3626# add-in our ca certificates
3727COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
3828
39- COPY --from=builder -- chown=app /app/cmd /app
29+ COPY --chown=app css /app
4030
4131# from now on, run as the unprivileged user
42- USER app
32+ USER 1000
4333
4434# entrypoint
45- ENTRYPOINT ["/app" ]
35+ ENTRYPOINT ["/app" ]
Original file line number Diff line number Diff line change @@ -6,8 +6,9 @@ Nags users on Slack about outstanding application vulnerabilities found by Crowd
66## Instructions
77
881 . Tag your Falcon hosts with
` email/user/company/com ` if their email is
` [email protected] ` .
9- 2 . Download a release of csn
10- 3 . Create a configuration file
9+ 2 . Fetch a binary release or Docker image from [ Releases] ( https://github.com/hazcod/crowdstrike-spotlight-slacker/releases ) .
10+ 3 . Create a Falcon API token to use in ` API Clients and Keys ` with ` Read ` permission to ` Hosts ` and ` Spotlight ` .
11+ 4 . Create a configuration file:
1112
1213``` yaml
1314slack :
@@ -44,5 +45,5 @@ message: |
4445 Please update them as soon as possible. In case of any issues, hop into *#security*.
4546 Thank you! :wave:
4647` ` `
47- 4. Run ` csn -config=your-config.yml`.
48+ 4. Run ` css -config=your-config.yml`.
48495. See it popup in Slack!
You can’t perform that action at this time.
0 commit comments