Skip to content

Commit f06605a

Browse files
authored
Merge branch 'main' into feat/warnings
2 parents eabb3a1 + ea0e609 commit f06605a

File tree

9 files changed

+1527
-71
lines changed

9 files changed

+1527
-71
lines changed

.github/go/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM golang:1.20
1+
FROM golang:1.21

.github/goreleaser.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ builds:
2727

2828
archives:
2929
-
30-
replacements:
31-
darwin: Darwin
32-
linux: Linux
33-
windows: Windows
34-
386: i386
35-
amd64: x86_64
30+
format: zip
31+
name_template: >-
32+
{{ .ProjectName }}_
33+
{{- title .Os }}_
34+
{{- if eq .Arch "amd64" }}x86_64
35+
{{- else if eq .Arch "386" }}i386
36+
{{- else }}{{ .Arch }}{{ end }}
3637
3738
checksum:
3839
name_template: 'checksums.txt'

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
-
11-
uses: actions/checkout@v3
11+
uses: actions/checkout@v4
1212
-
1313
id: versions
1414
run: |
1515
echo ::set-output name=go::$(grep '^FROM go' .github/go/Dockerfile | cut -d ' ' -f 2 | cut -d ':' -f 2)
1616
echo "Using Go version ${{ steps.versions.outputs.go }}"
1717
-
18-
uses: actions/setup-go@v3
18+
uses: actions/setup-go@v4
1919
with:
2020
go-version: ${{ steps.versions.outputs.go }}
2121
-
22-
uses: goreleaser/goreleaser-action@v4
22+
uses: goreleaser/goreleaser-action@v5
2323
with:
2424
version: latest
2525
args: build --config=.github/goreleaser.yml --snapshot

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
-
11-
uses: actions/checkout@v3
11+
uses: actions/checkout@v4
1212
-
1313
uses: reviewdog/action-golangci-lint@master
1414
with:

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
-
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616
-
1717
uses: go-semantic-release/action@v1
1818
with:
@@ -24,7 +24,7 @@ jobs:
2424
steps:
2525
-
2626
name: Checkout
27-
uses: actions/checkout@v3
27+
uses: actions/checkout@v4
2828
-
2929
name: Unshallow
3030
run: git fetch --prune --unshallow
@@ -35,19 +35,19 @@ jobs:
3535
echo "Using Go version ${{ steps.versions.outputs.go }}"
3636
-
3737
name: Set up Go
38-
uses: actions/setup-go@v3
38+
uses: actions/setup-go@v4
3939
with:
4040
go-version: ${{ steps.versions.outputs.go }}
4141
-
4242
name: Login to GitHub Container Registry
43-
uses: docker/login-action@v2
43+
uses: docker/login-action@v3
4444
with:
4545
registry: ghcr.io
4646
username: ${{ github.repository_owner }}
4747
password: ${{ secrets.GITHUB_TOKEN }}
4848
-
4949
name: Release
50-
uses: goreleaser/goreleaser-action@v4
50+
uses: goreleaser/goreleaser-action@v5
5151
with:
5252
version: latest
5353
args: release --config=.github/goreleaser.yml --clean

.github/workflows/todo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
-
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414
-
1515
name: Check Todos
1616
uses: ribtoks/tdg-github-action@master

go.mod

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,14 @@ module github.com/hazcod/crowdstrike-spotlight-slacker
33
go 1.16
44

55
require (
6-
github.com/crowdstrike/gofalcon v0.2.33
6+
github.com/crowdstrike/gofalcon v0.4.2
77
github.com/go-openapi/jsonreference v0.20.2 // indirect
8-
github.com/go-openapi/loads v0.21.2 // indirect
9-
github.com/go-openapi/runtime v0.25.0 // indirect
10-
github.com/go-openapi/spec v0.20.8 // indirect
11-
github.com/google/uuid v1.1.2 // indirect
128
github.com/gorilla/websocket v1.5.0 // indirect
139
github.com/kelseyhightower/envconfig v1.4.0
14-
github.com/mitchellh/mapstructure v1.5.0 // indirect
1510
github.com/pkg/errors v0.9.1
16-
github.com/sirupsen/logrus v1.9.0
17-
github.com/slack-go/slack v0.12.1
18-
go.mongodb.org/mongo-driver v1.11.2 // indirect
19-
go.opentelemetry.io/otel v1.14.0 // indirect
20-
golang.org/x/oauth2 v0.6.0
21-
google.golang.org/protobuf v1.28.1 // indirect
11+
github.com/sirupsen/logrus v1.9.3
12+
github.com/slack-go/slack v0.12.3
13+
golang.org/x/oauth2 v0.13.0
2214
gopkg.in/errgo.v2 v2.1.0
2315
gopkg.in/yaml.v3 v3.0.1
2416
)

go.sum

Lines changed: 1500 additions & 37 deletions
Large diffs are not rendered by default.

pkg/falcon/extractor.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import (
77
"encoding/json"
88
"fmt"
99
"github.com/crowdstrike/gofalcon/falcon/client/hosts"
10+
"github.com/crowdstrike/gofalcon/falcon/client/vulnerabilities"
1011
"github.com/pkg/errors"
1112
"math"
1213
"strings"
1314
"time"
1415

1516
"github.com/crowdstrike/gofalcon/falcon"
16-
"github.com/crowdstrike/gofalcon/falcon/client/spotlight_vulnerabilities"
1717
"github.com/crowdstrike/gofalcon/falcon/models"
1818
"github.com/hazcod/crowdstrike-spotlight-slacker/config"
1919
"github.com/sirupsen/logrus"
@@ -176,7 +176,7 @@ func GetMessages(config *config.Config, ctx context.Context) (results map[string
176176
return nil, nil, nil, errors.Wrap(err, "could not query all hosts")
177177
}
178178

179-
allHostDetails := make([]*models.DomainDeviceSwagger, 0)
179+
allHostDetails := make([]*models.DeviceapiDeviceSwagger, 0)
180180

181181
step := 100
182182

@@ -203,7 +203,7 @@ func GetMessages(config *config.Config, ctx context.Context) (results map[string
203203

204204
slicePart := hostResult.Payload.Resources[sliceStart:sliceEnd]
205205

206-
hostDetail, err := client.Hosts.GetDeviceDetails(&hosts.GetDeviceDetailsParams{
206+
hostDetail, err := client.Hosts.GetDeviceDetailsV2(&hosts.GetDeviceDetailsV2Params{
207207
Ids: slicePart,
208208
Context: ctx,
209209
HTTPClient: nil,
@@ -250,8 +250,8 @@ func GetMessages(config *config.Config, ctx context.Context) (results map[string
250250

251251
paginationToken := ""
252252
for {
253-
queryResult, err := client.SpotlightVulnerabilities.CombinedQueryVulnerabilities(
254-
&spotlight_vulnerabilities.CombinedQueryVulnerabilitiesParams{
253+
queryResult, err := client.Vulnerabilities.CombinedQueryVulnerabilities(
254+
&vulnerabilities.CombinedQueryVulnerabilitiesParams{
255255
Context: ctx,
256256
Filter: "status:'open'+suppression_info.is_suppressed:'false'",
257257
Limit: &falconAPIMaxRecords,

0 commit comments

Comments
 (0)