Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New attack technique: Invoke Bedrock Model #581

Merged
merged 37 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7c5b5da
New attack technique: Invoke Bedrock Model
Brucedh Sep 23, 2024
10c98a4
Generate docs
christophetd Oct 2, 2024
280c8f6
Use context.Background() instead of context.TODO()
christophetd Oct 2, 2024
84efad4
Simplify error handling logic
christophetd Oct 2, 2024
81c2db4
Rename wrapper to be a package-visible struct only
christophetd Oct 2, 2024
16dabce
added detection recommendations
Brucedh Oct 3, 2024
01bdf0e
fixed detection
Brucedh Oct 3, 2024
c159882
fixed detection
Brucedh Oct 3, 2024
371ee23
fixed detection
Brucedh Oct 3, 2024
3cd6396
autogenerate docs
christophetd Oct 3, 2024
b37c7f6
Added call to GetFoundationModelAvailability
Brucedh Oct 7, 2024
41f11c3
Updated docs, including the Permiso article
Brucedh Oct 7, 2024
0a93b47
Add Permiso ref
christophetd Oct 8, 2024
0cad50e
Error handling and avoid using context.TODO()
christophetd Oct 8, 2024
340678a
Autogen docs
christophetd Oct 8, 2024
d859206
Added calls to ListFoundationModelAgreementOffers, CreateFoundationMo…
Brucedh Oct 16, 2024
ca2b13e
changed idempotent to false
Brucedh Oct 17, 2024
dbd2b22
Autogen docs
christophetd Oct 17, 2024
ab63b2c
Rework Bedrock attack
christophetd Oct 17, 2024
552ace4
autogenerate docs
christophetd Oct 17, 2024
ae914a2
only create use-case and model agreement once per account
christophetd Oct 17, 2024
6770e28
Update docs
christophetd Oct 17, 2024
2f561c0
Update docs and refactor signature functions
christophetd Oct 17, 2024
56d075f
Better error descriptions and remove incorrect status code check
christophetd Oct 17, 2024
c219d68
Refactor methods inside a struct
christophetd Oct 17, 2024
b54279d
Add detonation logs
christophetd Oct 17, 2024
97d9f6f
Revert unnecessary Go version changes
christophetd Oct 17, 2024
38b94d5
Use go 1.21 in CI
christophetd Oct 17, 2024
1d9738a
Fix CI
christophetd Oct 17, 2024
6a0cdb1
Fix base Docker image
christophetd Oct 17, 2024
2eda4e7
Make final Stratus binary smaller by removing debug symbols
christophetd Oct 17, 2024
7b6156d
Upgrade staticcheck
christophetd Oct 17, 2024
ab22d61
Attempt using staticcheck 2023.1.4
christophetd Oct 17, 2024
ca0de4d
Install the appropriate Go version for staticcheck
christophetd Oct 17, 2024
971cf03
Merge branch 'main' into main
christophetd Oct 17, 2024
8542687
allow raw.githubusercontent.com network call in staticcheck CI
christophetd Oct 17, 2024
ee3158f
Fix SAST findings
christophetd Oct 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
pkg-containers.githubusercontent.com:443
production.cloudflare.docker.com:443
proxy.golang.org:443
sum.golang.org:443
registry-1.docker.io:443
storage.googleapis.com:443
*.actions.githubusercontent.com:443
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version: 1.19
go-version: 1.21
- name: Run GoReleaser
timeout-minutes: 60
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,15 @@ jobs:
storage.googleapis.com:443
sum.golang.org:443
golang.org:443
sum.golang.org:443
*.actions.githubusercontent.com:443
objects.githubusercontent.com:443
raw.githubusercontent.com:443
go.dev:443
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
with:
fetch-depth: 1
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version: 1.19
- uses: dominikh/staticcheck-action@fe1dd0c3658873b46f8c9bb3291096a617310ca6
with:
version: "2022.1"
install-go: false
install-go: true
working-directory: "./v2"
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
objects.githubusercontent.com:443
go.dev:443
golang.org:443
sum.golang.org:443
api.github.com:443
*.actions.githubusercontent.com:443
- name: Checkout repository
Expand All @@ -34,7 +35,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version: 1.19
go-version: 1.21

- name: Run unit tests
run: make test
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20.4-alpine3.16@sha256:6469405d7297f82d56195c90a3270b0806ef4bd897aa0628477d9959ab97a577 AS builder
FROM golang:1.21.13-alpine3.20@sha256:2414035b086e3c42b99654c8b26e6f5b1b1598080d65fd03c7f499552ff4dc94 AS builder
ARG VERSION=dev-snapshot
RUN mkdir /build
RUN apk add --update make
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export GO111MODULE=on
BIN_DIR := $(ROOT_DIR)/bin

# Define go flags
GOFLAGS := -ldflags="-X main.BuildVersion=$(BUILD_VERSION)"
GOFLAGS := -ldflags="-X main.BuildVersion=$(BUILD_VERSION) -w"

.PHONY: build docs test thirdparty-licenses mocks

Expand Down Expand Up @@ -44,4 +44,4 @@ mocks:
@cd v2 && mockery --name=StateManager --dir internal/state --output internal/state/mocks
@cd v2 && mockery --name=TerraformManager --dir pkg/stratus/runner --output pkg/stratus/runner/mocks
@cd v2 && mockery --name=FileSystem --structname FileSystemMock --dir internal/state --output internal/state/mocks
@echo "Mocks generated successfully."
@echo "Mocks generated successfully."
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ See the documentation at **[stratus-red-team.cloud](https://stratus-red-team.clo

### Direct install

Requires Go 1.19+
Requires Go 1.21+

```
go install -v github.com/datadog/stratus-red-team/v2/cmd/stratus@latest
Expand Down
Loading
Loading