Skip to content

Commit

Permalink
Merge pull request #264 from projectdiscovery/dev
Browse files Browse the repository at this point in the history
katana v0.0.3
  • Loading branch information
ehsandeep committed Jan 13, 2023
2 parents 60f0863 + 4845fd4 commit 8e34ee6
Show file tree
Hide file tree
Showing 43 changed files with 1,552 additions and 357 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
target-branch: "dev"
commit-message:
prefix: "chore"
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]

os: [ubuntu-latest, windows-latest, macOS-12]
go-version: [1.18.x, 1.19.x]
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: ${{ matrix.go-version }}

- name: Check out code
uses: actions/checkout@v3
Expand All @@ -31,6 +31,12 @@ jobs:
run: go build .
working-directory: cmd/katana/

- name: Integration Tests
env:
GH_ACTION: true
run: bash run.sh
working-directory: integration_tests/

- name: Install
run: go install
working-directory: cmd/katana/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dockerhub-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm
platforms: linux/amd64,linux/arm64
push: true
tags: projectdiscovery/katana:latest,projectdiscovery/katana:${{ steps.meta.outputs.tag }}
2 changes: 1 addition & 1 deletion .github/workflows/lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3.3.0
uses: golangci/golangci-lint-action@v3.3.1
with:
version: latest
args: --timeout 5m
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release-binary.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: 🎉 Release Binary

on:
create:
push:
tags:
- v*
workflow_dispatch:
Expand All @@ -21,11 +21,13 @@ jobs:
go-version: 1.18

- name: "Create release on GitHub"
uses: goreleaser/goreleaser-action@v3
uses: goreleaser/goreleaser-action@v4
with:
args: "release --rm-dist"
version: latest
workdir: .
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
SLACK_WEBHOOK: "${{ secrets.RELEASE_SLACK_WEBHOOK }}"
DISCORD_WEBHOOK_ID: "${{ secrets.DISCORD_WEBHOOK_ID }}"
DISCORD_WEBHOOK_TOKEN: "${{ secrets.DISCORD_WEBHOOK_TOKEN }}"
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
security-crawl-maze/
cmd/katana/katana
katana
*.exe
*.exe
katana_*/
katana_*/
6 changes: 5 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,8 @@ announce:
enabled: true
channel: '#release'
username: GoReleaser
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'

discord:
enabled: true
message_template: '**New Release: {{ .ProjectName }} {{.Tag}}** is published! Check it out at {{ .ReleaseURL }}'
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.19.3-alpine AS builder
FROM golang:1.19.4-alpine AS builder
RUN apk add --no-cache git
RUN go install -v github.com/projectdiscovery/katana/cmd/katana@latest

FROM alpine:3.16.2
FROM alpine:3.17.0
RUN apk -U upgrade --no-cache \
&& apk add --no-cache bind-tools ca-certificates chromium
COPY --from=builder /go/bin/katana /usr/local/bin/
Expand Down
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOMOD=$(GOCMD) mod
GOTEST=$(GOCMD) test
GOFLAGS := -v
# This should be disabled if the binary uses pprof
LDFLAGS := -s -w

ifneq ($(shell go env GOOS),darwin)
LDFLAGS := -extldflags "-static"
endif

all: build
build:
$(GOBUILD) $(GOFLAGS) -ldflags '$(LDFLAGS)' -o "katana" cmd/katana/main.go
test:
$(GOTEST) $(GOFLAGS) ./...
integration:
cd integration_tests; bash run.sh cd ..
tidy:
$(GOMOD) tidy

0 comments on commit 8e34ee6

Please sign in to comment.