Skip to content

Commit b6dfe30

Browse files
committed
add brakeman step
1 parent e16d612 commit b6dfe30

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ci/main.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@ func (m *Ci) Lint(ctx context.Context, dir *dagger.Directory) (string, error) {
3838
Stdout(ctx)
3939
}
4040

41+
// Returns the Sast report as a file
42+
func (m *Ci) Sast(ctx context.Context, directory *dagger.Directory) *dagger.File {
43+
return dag.Container().
44+
From("presidentbeef/brakeman:latest").
45+
WithMountedDirectory("/app", directory).
46+
WithWorkdir("/app").
47+
WithExec([]string{"/usr/src/app/bin/brakeman", }).
48+
File("/app/brakeman-output.tabs")
49+
}
50+
51+
4152
// Creates a PostgreSQL service for local testing based on the official image with the provided version. If no version is provided, 'latest' will be used.
4253
func (m *Ci) Postgres(
4354
_ context.Context,

0 commit comments

Comments
 (0)