Skip to content

Commit

Permalink
Merge pull request #26 from dreadnode/ads/eng-263-feature-create-exam…
Browse files Browse the repository at this point in the history
…ple-for-cicd-squealer

feat: squealer example cicd go package
  • Loading branch information
evilsocket authored Nov 26, 2024
2 parents 1b579f2 + 333db9e commit 251364a
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
21 changes: 21 additions & 0 deletions cybersecurity/cicd/squealer.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Git clone stage
FROM alpine:latest AS source
RUN apk add --no-cache git
WORKDIR /src
RUN git clone https://github.com/owenrumney/squealer.git . && \
ls -la # Debug: verify files

# Build stage
FROM golang:1.21-alpine AS builder
WORKDIR /build
COPY --from=source /src/ ./
RUN ls -la && \
go mod vendor && \
go build -mod=vendor -ldflags="-w -s" -o squealer ./cmd/squealer

# Final stage
FROM gcr.io/distroless/static-debian12:nonroot
WORKDIR /app
COPY --from=builder /build/squealer /app/
USER nonroot:nonroot
ENTRYPOINT ["/app/squealer"]
37 changes: 37 additions & 0 deletions cybersecurity/cicd/squealer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
description: Squealer is a tool that finds secrets like keys, tokens and passwords in your code. It scans remote Git repositories for potential credential leaks.

categories:
- cybersecurity
- cicd

functions:
squealer_scan_git_repo:
description: Scan a remote git repository for secrets and credentials
parameters:
repository:
type: string
description: Git repository URL (SSH format)
examples:
- "[email protected]:username/repo.git"
- "[email protected]:owenrumney/woopsie.git"
container:
force: true
image: squealer:latest
cmdline:
- ${repository}

squealer_scan_everything_git_repo:
description: Scan a remote git repository and history for secrets and credentials with everything flag
parameters:
repository:
type: string
description: Git repository URL (SSH format)
examples:
- "[email protected]:username/repo.git"
- "[email protected]:owenrumney/woopsie.git"
container:
force: true
image: squealer:latest
cmdline:
- ${repository}
- --everything

0 comments on commit 251364a

Please sign in to comment.