Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
gitworkflows committed Dec 8, 2023
1 parent ba3603d commit f17ca62
Show file tree
Hide file tree
Showing 263 changed files with 1,834 additions and 1,790 deletions.
Binary file added .DS_Store
Binary file not shown.
Binary file added .github/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/BUG_REPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Briefly describe the problem you are having in a few paragraphs.
## What happened instead?


## Output of run with `POSTEE_DEBUG=true`:
## Output of run with `HOOKER_DEBUG=true`:

```
(paste your output here)
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Support Question
labels: triage/support
about: If you have a question about Postee.
about: If you have a question about Hooker.
---

<!--
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,22 @@ jobs:
- name: Run Integration Tests
run: make test-integration

- name: Run Trivy vulnerability scanner in repo mode
- name: Run Tunnel vulnerability scanner in repo mode
uses: aquasecurity/[email protected]
with:
scan-type: 'fs'
ignore-unfixed: true
format: 'sarif'
output: 'trivy-results.sarif'
output: 'tunnel-results.sarif'
severity: 'CRITICAL'
exit-code: 0

- name: Upload Trivy scan results to GitHub Security tab
- name: Upload Tunnel scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-results.sarif'
sarif_file: 'tunnel-results.sarif'

- name: Run Trivy vulnerability scanner in IaC mode
- name: Run Tunnel vulnerability scanner in IaC mode
uses: aquasecurity/[email protected]
with:
scan-type: 'config'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Aqua Cloud
name: Khulnasoft Cloud

on:
push:
Expand All @@ -14,15 +14,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Run Trivy vulnerability scanner against Aqua Cloud
- name: Run Tunnel vulnerability scanner against Khulnasoft Cloud
uses: aquasecurity/[email protected]
with:
scan-type: 'fs'
hide-progress: true
format: 'table'
security-checks: 'vuln,config'
env:
AQUA_KEY: ${{ secrets.AQUA_KEY }}
AQUA_SECRET: ${{ secrets.AQUA_SECRET }}
TRIVY_RUN_AS_PLUGIN: 'aqua'
KHULNASOFT_KEY: ${{ secrets.KHULNASOFT_KEY }}
KHULNASOFT_SECRET: ${{ secrets.KHULNASOFT_SECRET }}
TUNNEL_RUN_AS_PLUGIN: 'khulnasoft'

8 changes: 4 additions & 4 deletions .github/workflows/publish-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ on:
workflow_dispatch: # manually it will get the latest tag to publish the helm chart
env:
HELM_REP: helm-charts
GH_OWNER: aquasecurity
CHART_DIR: deploy/helm/postee
GH_OWNER: khulnasoft-lab
CHART_DIR: deploy/helm/hooker
GO_VERSION: "1.18"
KIND_VERSION: "v0.12.0"
KIND_IMAGE: "kindest/node:v1.23.4@sha256:0e34f0d0fd448aa2f2819cfd74e99fe5793a6e4938b328f657c8e3f81ee0dfb9"
Expand Down Expand Up @@ -75,5 +75,5 @@ jobs:
destination_repo: '${{ env.GH_OWNER }}/${{ env.HELM_REP }}'
destination_folder: '.'
destination_branch: 'gh-pages'
user_email: aqua[email protected]
user_name: 'aqua-bot'
user_email: khulnasoft[email protected]
user_name: 'khulnasoft-bot'
10 changes: 5 additions & 5 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# This is a manually triggered workflow to build and publish the MkDocs from the
# specified Git revision to GitHub pages on https://aquasecurity.github.io/postee
# specified Git revision to GitHub pages on https://khulnasoft-lab.github.io/hooker
name: Publish Documentation

on:
Expand Down Expand Up @@ -30,14 +30,14 @@ jobs:
with:
python-version: 3.x
- run: |
pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material.git
pip install mike
pip install mkdocs-macros-plugin
env:
# Note: It is not the same as ${{ secrets.GITHUB_TOKEN }} !
GH_TOKEN: ${{ secrets.MKDOCS_AQUA_BOT }}
GH_TOKEN: ${{ secrets.MKDOCS_KHULNASOFT_BOT }}
- run: |
git config user.name "aqua-bot"
git config user.email "aqua[email protected]"
git config user.name "khulnasoft-bot"
git config user.email "khulnasoft[email protected]"
- run: |
mike deploy --push --update-aliases ${{ github.event.inputs.ref }} latest
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Run Integration Tests
run: make test-integration

- name: Run Trivy vulnerability scanner in repo mode
- name: Run Tunnel vulnerability scanner in repo mode
uses: aquasecurity/[email protected]
with:
scan-type: 'fs'
Expand All @@ -40,17 +40,17 @@ jobs:
severity: 'CRITICAL'
exit-code: 0

- name: Run Trivy vulnerability scanner against Aqua Cloud
- name: Run Tunnel vulnerability scanner against Khulnasoft Cloud
uses: aquasecurity/[email protected]
with:
scan-type: 'fs'
hide-progress: true
format: 'table'
security-checks: 'vuln,config'
env:
AQUA_KEY: ${{ secrets.AQUA_KEY }}
AQUA_SECRET: ${{ secrets.AQUA_SECRET }}
TRIVY_RUN_AS_PLUGIN: 'aqua'
KHULNASOFT_KEY: ${{ secrets.KHULNASOFT_KEY }}
KHULNASOFT_SECRET: ${{ secrets.KHULNASOFT_SECRET }}
TUNNEL_RUN_AS_PLUGIN: 'khulnasoft'

release:
name: Release
Expand Down
13 changes: 0 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +0,0 @@
.idea/
bin/
pkg/
src/github.com/
src/gopkg.in/
src/go.etcd.io/
**/*.out
**/*.db
coverage.txt
dist/
.vscode/


68 changes: 34 additions & 34 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project_name: postee
project_name: hooker
release:
draft: false
prerelease: auto
Expand All @@ -9,10 +9,10 @@ before:
hooks:
- make build
builds:
- id: postee
- id: hooker
dir: .
main: ./main.go
binary: postee
binary: hooker
ldflags:
- -s -w
- "-extldflags '-static'"
Expand All @@ -32,7 +32,7 @@ builds:
archives:
- name_template: "{{ .ProjectName }}_{{.Version}}_{{ .Os }}_{{ .Arch }}"
builds:
- postee
- hooker
replacements:
amd64: 64bit
arm: ARM
Expand All @@ -56,68 +56,68 @@ dockers:
goos: linux
goarch: amd64
image_templates:
- "docker.io/aquasec/postee:{{ .Version }}-amd64"
- "public.ecr.aws/aquasecurity/postee:{{ .Version }}-amd64"
- "docker.io/aquasec/postee:latest"
- "public.ecr.aws/aquasecurity/postee:latest"
- "docker.io/khulnasoft/hooker:{{ .Version }}-amd64"
- "public.ecr.aws/khulnasoft-lab/hooker:{{ .Version }}-amd64"
- "docker.io/khulnasoft/hooker:latest"
- "public.ecr.aws/khulnasoft-lab/hooker:latest"
ids:
- postee
- hooker
extra_files:
- rego-templates/
- rego-filters/
- cfg.yaml
build_flag_templates:
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.description=Command line interface for Postee"
- "--label=org.opencontainers.image.vendor=Aqua Security"
- "--label=org.opencontainers.image.description=Command line interface for Hooker"
- "--label=org.opencontainers.image.vendor=Khulnasoft Security"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.source=https://github.com/aquasecurity/postee"
- "--label=org.opencontainers.image.source=https://github.com/khulnasoft-lab/hooker"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--platform=linux/amd64"
- dockerfile: Dockerfile.ui
use: buildx
goos: linux
goarch: amd64
image_templates:
- "docker.io/aquasec/postee-ui:{{ .Version }}-amd64"
- "public.ecr.aws/aquasecurity/postee-ui:{{ .Version }}-amd64"
- "docker.io/aquasec/postee-ui:latest"
- "public.ecr.aws/aquasecurity/postee-ui:latest"
- "docker.io/khulnasoft/hooker-ui:{{ .Version }}-amd64"
- "public.ecr.aws/khulnasoft-lab/hooker-ui:{{ .Version }}-amd64"
- "docker.io/khulnasoft/hooker-ui:latest"
- "public.ecr.aws/khulnasoft-lab/hooker-ui:latest"
ids:
- postee-ui
- hooker-ui
extra_files:
- rego-templates/
- rego-filters/
- cfg.yaml
- ui/
build_flag_templates:
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.description=Postee UI"
- "--label=org.opencontainers.image.vendor=Aqua Security"
- "--label=org.opencontainers.image.description=Hooker UI"
- "--label=org.opencontainers.image.vendor=Khulnasoft Security"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.source=https://github.com/aquasecurity/postee"
- "--label=org.opencontainers.image.source=https://github.com/khulnasoft-lab/hooker"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.documentation=https://aquasecurity.github.io/postee/v{{ .Version }}/"
- "--label=org.opencontainers.image.documentation=https://khulnasoft-lab.github.io/hooker/v{{ .Version }}/"
- "--platform=linux/amd64"
docker_manifests:
- name_template: 'aquasec/postee:{{ .Version }}'
- name_template: 'khulnasoft/hooker:{{ .Version }}'
image_templates:
- 'aquasec/postee:{{ .Version }}-amd64'
- name_template: 'public.ecr.aws/aquasecurity/postee:{{ .Version }}'
- 'khulnasoft/hooker:{{ .Version }}-amd64'
- name_template: 'public.ecr.aws/khulnasoft-lab/hooker:{{ .Version }}'
image_templates:
- 'public.ecr.aws/aquasecurity/postee:{{ .Version }}-amd64'
- name_template: 'aquasec/postee:latest'
- 'public.ecr.aws/khulnasoft-lab/hooker:{{ .Version }}-amd64'
- name_template: 'khulnasoft/hooker:latest'
image_templates:
- 'aquasec/postee:{{ .Version }}-amd64'
# Postee-UI
- name_template: 'aquasec/postee-ui:{{ .Version }}'
- 'khulnasoft/hooker:{{ .Version }}-amd64'
# Hooker-UI
- name_template: 'khulnasoft/hooker-ui:{{ .Version }}'
image_templates:
- 'aquasec/postee-ui:{{ .Version }}-amd64'
- name_template: 'public.ecr.aws/aquasecurity/postee-ui:{{ .Version }}'
- 'khulnasoft/hooker-ui:{{ .Version }}-amd64'
- name_template: 'public.ecr.aws/khulnasoft-lab/hooker-ui:{{ .Version }}'
image_templates:
- 'public.ecr.aws/aquasecurity/postee-ui:{{ .Version }}-amd64'
- name_template: 'aquasec/postee-ui:latest'
- 'public.ecr.aws/khulnasoft-lab/hooker-ui:{{ .Version }}-amd64'
- name_template: 'khulnasoft/hooker-ui:latest'
image_templates:
- 'aquasec/postee-ui:{{ .Version }}-amd64'
- 'khulnasoft/hooker-ui:{{ .Version }}-amd64'
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM golang:1.18-alpine as builder
COPY . /server/
WORKDIR /server/
ARG TARGETOS TARGETARCH
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build --ldflags "-s -w" -o ./bin/postee main.go
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build --ldflags "-s -w" -o ./bin/hooker main.go

FROM alpine:3.18.2
RUN apk update && apk add wget ca-certificates curl jq
Expand All @@ -18,10 +18,10 @@ COPY --from=builder /server/rego-templates /server/rego-templates
COPY --from=builder /server/rego-filters /server/rego-filters
COPY --from=builder /server/cfg.yaml /server/cfg.yaml
WORKDIR /server
RUN chmod +x postee
RUN addgroup -g 1099 postee
RUN adduser -D -g '' -G postee -u 1099 postee
RUN chown -R postee:postee /server
RUN chown -R postee:postee /config
USER postee
ENTRYPOINT ["/server/postee"]
RUN chmod +x hooker
RUN addgroup -g 1099 hooker
RUN adduser -D -g '' -G hooker -u 1099 hooker
RUN chown -R hooker:hooker /server
RUN chown -R hooker:hooker /config
USER hooker
ENTRYPOINT ["/server/hooker"]
16 changes: 8 additions & 8 deletions Dockerfile.release
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ EXPOSE 8445
RUN mkdir /server
RUN mkdir /server/database
RUN mkdir /config
COPY postee /server/
COPY hooker /server/
COPY rego-templates /server/rego-templates
COPY rego-filters /server/rego-filters
COPY cfg.yaml /config/
WORKDIR /server
RUN chmod +x postee
RUN addgroup -g 1099 postee
RUN adduser -D -g '' -G postee -u 1099 postee
RUN chown -R postee:postee /server
RUN chown -R postee:postee /config
USER postee
ENTRYPOINT ["/server/postee"]
RUN chmod +x hooker
RUN addgroup -g 1099 hooker
RUN adduser -D -g '' -G hooker -u 1099 hooker
RUN chown -R hooker:hooker /server
RUN chown -R hooker:hooker /config
USER hooker
ENTRYPOINT ["/server/hooker"]
18 changes: 9 additions & 9 deletions Dockerfile.ui
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ COPY . /server
WORKDIR /server/ui/backend
RUN apk add git
ARG TARGETOS TARGETARCH
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build --ldflags "-s -w" -o posteeui
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build --ldflags "-s -w" -o hookerui

FROM alpine:3.18.2
EXPOSE 8001
Expand All @@ -24,14 +24,14 @@ RUN mkdir /server
RUN mkdir /server/database
RUN mkdir /config

COPY --from=gobuilder /server/ui/backend/posteeui /uiserver
COPY --from=gobuilder /server/ui/backend/hookerui /uiserver
COPY --from=vuebuilder /frontend/dist /uiserver/www

WORKDIR /uiserver
RUN addgroup -g 1099 postee
RUN adduser -D -g '' -G postee -u 1099 postee
RUN chown -R postee:postee /server
RUN chown -R postee:postee /config
RUN chown -R postee:postee /uiserver
USER postee
ENTRYPOINT ["/uiserver/posteeui"]
RUN addgroup -g 1099 hooker
RUN adduser -D -g '' -G hooker -u 1099 hooker
RUN chown -R hooker:hooker /server
RUN chown -R hooker:hooker /config
RUN chown -R hooker:hooker /uiserver
USER hooker
ENTRYPOINT ["/uiserver/hookerui"]
Loading

0 comments on commit f17ca62

Please sign in to comment.