Skip to content

Commit c9b1a20

Browse files
committed
chore: fix merge conflict
2 parents 10f60ef + 9280382 commit c9b1a20

File tree

6 files changed

+28
-24
lines changed

6 files changed

+28
-24
lines changed

.github/.DS_Store

-6 KB
Binary file not shown.

.github/goreleaser.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@ before:
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+
512
builds:
613
-
14+
binary: css
715
env:
816
- CGO_ENABLED=0
917
ldflags:

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ jobs:
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

.github/workflows/tag.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ jobs:
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 }}

Dockerfile

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,14 @@
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
76
RUN apk add -U --no-cache ca-certificates tzdata
87

98
# add unprivileged user
109
RUN 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
3727
COPY --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"]

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ Nags users on Slack about outstanding application vulnerabilities found by Crowd
66
## Instructions
77

88
1. 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
1314
slack:
@@ -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`.
4849
5. See it popup in Slack!

0 commit comments

Comments
 (0)