From ac962744f7f4a12d04ade43991880d2cc3a7a3f1 Mon Sep 17 00:00:00 2001 From: Recep Gunes Date: Thu, 12 Mar 2026 22:03:51 +0300 Subject: [PATCH 1/3] ci: restructure workflows to enforce gitflow with dev branch --- .github/dependabot.yml | 2 + .github/workflows/ci.yaml | 64 +++++++++++++++++++ .github/workflows/dependency-guard.yaml | 6 +- .../workflows/{tests.yaml => release.yaml} | 59 +---------------- .github/workflows/update-contributors.yaml | 8 +-- 5 files changed, 74 insertions(+), 65 deletions(-) create mode 100644 .github/workflows/ci.yaml rename .github/workflows/{tests.yaml => release.yaml} (71%) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 7a62fed..1bed2db 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -2,6 +2,7 @@ version: 2 updates: - package-ecosystem: "gomod" directory: "/" + target-branch: "dev" schedule: interval: "weekly" commit-message: @@ -10,6 +11,7 @@ updates: - package-ecosystem: "github-actions" directory: "/" + target-branch: "dev" schedule: interval: "weekly" commit-message: diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..e0a4407 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,64 @@ +name: CI + +on: + push: + branches: + - main + - dev + pull_request: + branches: + - dev + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + name: "Lint" + if: ${{ !endsWith(github.actor, '[bot]') }} + runs-on: ubuntu-24.04-arm + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + + - uses: actions/setup-go@v6 + with: + go-version: "1.25" + cache: true + + - uses: golangci/golangci-lint-action@v9 + with: + version: latest + args: --config=.golangci.yaml + + - uses: ibiqlik/action-yamllint@v3 + with: + file_or_dir: . + config_file: .yamllint.yaml + + - name: Run go vet + run: go vet ./... + + - name: Run trufflehog + uses: trufflesecurity/trufflehog@main + with: + path: ./ + base: "${{ github.event.pull_request.base.sha || github.event.before }}" + head: "${{ github.event.pull_request.head.sha || github.sha }}" + extra_args: --debug --only-verified + + - name: Install gosec + run: | + go install github.com/securego/gosec/v2/cmd/gosec@latest + echo "$(go env GOPATH)/bin" >> $GITHUB_PATH + - name: Run gosec + run: gosec ./... + + - name: Run typos + uses: crate-ci/typos@v1 diff --git a/.github/workflows/dependency-guard.yaml b/.github/workflows/dependency-guard.yaml index 947ebea..e4a4be2 100644 --- a/.github/workflows/dependency-guard.yaml +++ b/.github/workflows/dependency-guard.yaml @@ -4,7 +4,7 @@ on: pull_request: types: [opened, synchronize] branches: - - main + - dev jobs: compat-checks: @@ -13,7 +13,7 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: ref: ${{ github.head_ref }} token: ${{ secrets.GITHUB_TOKEN }} @@ -23,7 +23,7 @@ jobs: git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - - uses: actions/setup-go@v5 + - uses: actions/setup-go@v6 with: go-version-file: go.mod diff --git a/.github/workflows/tests.yaml b/.github/workflows/release.yaml similarity index 71% rename from .github/workflows/tests.yaml rename to .github/workflows/release.yaml index 0a883bc..9ac0254 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/release.yaml @@ -1,16 +1,9 @@ ---- +name: Release -name: 🔨 Tests on: push: - branches: ["dev", "main"] tags: - "v*" - pull_request: - paths: - - "**.go" - - "**.mod" - workflow_dispatch: permissions: contents: write @@ -20,55 +13,8 @@ concurrency: cancel-in-progress: true jobs: - lint: - name: "Lint" - if: ${{ !endsWith(github.actor, '[bot]') }} - runs-on: ubuntu-24.04-arm - steps: - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - - uses: actions/setup-go@v6 - with: - go-version: "1.25" - cache: true - - - uses: golangci/golangci-lint-action@v9 - with: - version: latest - args: --config=.golangci.yaml - - - uses: ibiqlik/action-yamllint@v3 - with: - file_or_dir: . - config_file: .yamllint.yaml - - - name: Run go vet - run: go vet ./... - - - name: Run trufflehog - uses: trufflesecurity/trufflehog@main - with: - path: ./ - base: "${{ github.event.pull_request.base.sha || github.event.before }}" - head: "${{ github.event.pull_request.head.sha || github.sha }}" - extra_args: --debug --only-verified - - - name: Install gosec - run: | - go install github.com/securego/gosec/v2/cmd/gosec@latest - echo "$(go env GOPATH)/bin" >> $GITHUB_PATH - - name: Run gosec - run: gosec ./... - - - name: Run typos - uses: crate-ci/typos@v1 - create-release: name: "📦 Create Release" - needs: lint - if: startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-24.04-arm steps: - name: Checkout @@ -85,7 +31,6 @@ jobs: release-linux: name: "🐧 Release Linux" needs: create-release - if: startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-24.04-arm steps: - name: Checkout @@ -121,7 +66,6 @@ jobs: release-windows: name: "🪟 Release Windows" needs: create-release - if: startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-24.04-arm steps: - name: Checkout @@ -157,7 +101,6 @@ jobs: release-darwin: name: "🍎 Release macOS" needs: create-release - if: startsWith(github.ref, 'refs/tags/v') runs-on: macos-latest steps: - name: Checkout diff --git a/.github/workflows/update-contributors.yaml b/.github/workflows/update-contributors.yaml index 84f4661..ad26063 100644 --- a/.github/workflows/update-contributors.yaml +++ b/.github/workflows/update-contributors.yaml @@ -3,7 +3,7 @@ name: Update Contributors on: push: branches: - - main + - dev jobs: contrib-readme-job: @@ -18,6 +18,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - auto_detect_branch_protection: true - commit_message: "docs(contributor): contrib-readme-action has updated readme" - pr_title_on_protected: "docs(contributor): contributors readme action update" + auto_detect_branch_protection: true + commit_message: "docs(contributor): contrib-readme-action has updated readme" + pr_title_on_protected: "docs(contributor): contributors readme action update" From a420b03a5a932da48dc59d1b1303f1a05e66c12a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 19:04:03 +0000 Subject: [PATCH 2/3] docs(contributor): contrib-readme-action has updated readme --- README.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/README.md b/README.md index 80ff093..4796327 100644 --- a/README.md +++ b/README.md @@ -174,6 +174,63 @@ Templates are automatically cloned to `~/vt-templates` on first run. ## Contributors + + + + + + + + + + + + + + +
+ + recepgunes1 +
+ Recep Gunes +
+
+ + dogancanbakir +
+ Dogan Can Bakir +
+
+ + omarkurt +
+ Omar Kurt +
+
+ + ahsentekd +
+ Ahsen +
+
+ + atiilla +
+ Atilla +
+
+ + mirackayikci +
+ mirackayikci +
+
+ + numanturle +
+ numan +
+
--- From bd7d551904f8d51ece7de01a06edeed9b03b90ef Mon Sep 17 00:00:00 2001 From: Recep Gunes Date: Fri, 13 Mar 2026 18:05:58 +0300 Subject: [PATCH 3/3] docs: update CONTRIBUTING and README for dev branch workflow --- CONTRIBUTING.md | 4 +++- README.md | 9 +++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 651602c..04090d4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,12 +7,14 @@ We welcome contributions from everyone! Here's how you can contribute: Start by forking our [vulnerable-target repository](https://github.com/HappyHackingSpace/vulnerable-target). 2. **Create a New Branch** + - Always base your work from the `dev` branch, which is the development branch with the latest code. - Make your changes - If you want to add a new vulnerable target template, please contribute to our separate templates repository: [vt-templates](https://github.com/HappyHackingSpace/vt-templates). You can check the [example template](https://github.com/HappyHackingSpace/vt-templates/blob/main/cves/vt-2024-53995/index.yaml). - Test your changes locally before submitting 3. **Submit a Pull Request** - - Open a pull request with your changes + - Open a pull request targeting the **`dev`** branch + - CI will automatically run linting, security scans, and tests on your PR - Include a clear description of what your contribution adds - Reference any related issues diff --git a/README.md b/README.md index 4796327..3aac0f0 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,8 @@ Spin up vulnerable targets from your terminal 🎯 - [Templates](#templates) - [What can you do with vt?](#what-can-you-do-with-vt) - [Documentation](#documentation) +- [Star History](#star-history) +- [Contributors](#contributors) - [Community](#community) - [License](#license) @@ -91,10 +93,8 @@ vt start --id vt-dvwa | `vt template --list --filter ` | Filter templates by tag | | `vt template --update` | Update templates from remote repository | | `vt start --id ` | Start a vulnerable environment | -| `vt start --tags ` | Start all templates matching tags | | `vt ps` | List running environments | | `vt stop --id ` | Stop an environment | -| `vt stop --tags ` | Stop all templates matching tags | | `vt -v debug ` | Run with debug verbosity | @@ -108,9 +108,6 @@ vt template --list --filter sqli # Start DVWA (Damn Vulnerable Web App) vt start --id vt-dvwa -# Start all XSS-related labs -vt start --tags xss - # Check running environments vt ps @@ -245,7 +242,7 @@ Templates are automatically cloned to `~/vt-templates` on first run. ## License -This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. +This project is licensed under the MIT License - see the [LICENSE.md](./LICENSE.md) file for details. ---