Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
16b07b0
feat(generate) : add prometheus scrape config generator
maya-ots May 17, 2026
2d56e50
fix: format code with gofmt
maya-ots May 17, 2026
08b86a6
feat : create an in memory text builder(empty text container)
maya-ots May 23, 2026
c879d1c
feat : add imports
maya-ots May 23, 2026
692f601
feat : sort challenges
maya-ots May 23, 2026
54d3572
feat : add configuration generation logic
maya-ots May 23, 2026
5eec1a4
fix : format and refine prometheus generator
maya-ots May 23, 2026
16ad17a
feat : add generator to plan
maya-ots May 25, 2026
c429eaa
fix : correct prometheus syntax
maya-ots May 26, 2026
79d31ee
fix : fixing bugs
maya-ots May 26, 2026
2d14359
test : verify prometheus generator outputs scrape jobs with instanced…
maya-ots May 26, 2026
f96445a
feat: implement GitOps State Sync for deploy and rollback
ademboukabes May 26, 2026
64bd1d3
Commit A: Initial challenge
ademboukabes May 26, 2026
6c6fa67
Commit A: Initial challenge (fixed)
ademboukabes May 26, 2026
13d637f
Add test integration project
ademboukabes May 26, 2026
fe3ede0
chore: remove unused test‑integration scaffolding and update .gitignore
ademboukabes May 26, 2026
235b4d1
chore: restore test-integration scaffold (re-added after cleanup)
ademboukabes May 26, 2026
3cf7ade
fix: proper indentation for PushTags error handling
ademboukabes May 26, 2026
55e9b2f
fix(deploy): improve rollback system and fix lint issues
ademboukabes May 26, 2026
49cb709
feat(solve): --against-instance runs a solver against a live per-team…
edaywalid May 29, 2026
51c73e8
feat(platform): re-upload CTFd assets when content hash changes
edaywalid May 29, 2026
7591ac0
fix(generate) : avoid mutating challenge slice in PrometheusConfig
maya-ots May 29, 2026
2c83cd3
test: update sample-event prometheus fixture
maya-ots May 29, 2026
ba20cd4
fix(deploy): remove test-integration tree (violates examples/ convent…
ademboukabes May 29, 2026
1851433
fix(deploy): gate registry/translate path on registry.url presence
ademboukabes May 29, 2026
c8f4357
test(deploy): verify Plan defaults to original docker-compose.yml
ademboukabes May 29, 2026
36dc21b
test(init): add prompt injection tests for promptString and promptChoice
ademboukabes May 29, 2026
9ece4d3
docs: update CONTRIBUTING and BACKLOG for completed init prompt tests
ademboukabes May 29, 2026
3c93ca8
feat(validate): enforce capability and privileged allowlists
ademboukabes Jul 2, 2026
b71a0df
feat(doctor): add D040, D041, D042 advanced checks
ademboukabes Jul 2, 2026
d98a739
chore: rerun CI
maya-ots Sep 12, 2026
71187de
fix(generate): normalize asset paths
maya-ots Sep 12, 2026
6c5b27a
Merge pull request #17 from MicroClub-USTHB/feature/deploy-rollback
ademboukabes Oct 2, 2026
7c2dbc1
chore(ci): enable GitHub Actions for develop branch
ademboukabes Oct 2, 2026
65e5ca7
Merge pull request #20 from MicroClub-USTHB/feature/init-prompt-tests
ademboukabes Oct 2, 2026
1756aea
Merge pull request #23 from MicroClub-USTHB/feat/sec004-allowlist
ademboukabes Oct 2, 2026
1625966
Merge pull request #24 from MicroClub-USTHB/feat/doctor-enhancements
ademboukabes Oct 2, 2026
ac41f18
Merge pull request #25 from MicroClub-USTHB/solve/against-instance(wa…
ademboukabes Oct 2, 2026
58abebb
Merge branch 'platform/ctfd-content-hash' into develop
ademboukabes Oct 2, 2026
eec2986
docs(backlog): remove shipped items to reflect current state
ademboukabes Oct 2, 2026
8ccc81d
docs(spec): document mctf doctor rules
ademboukabes Oct 2, 2026
427b01d
feat(instancer): mint per-team dynamic flags at spawn time
ademboukabes Oct 2, 2026
6790b77
style: fix gofmt trailing whitespace in lifecycle_test.go
ademboukabes Oct 2, 2026
89d776b
docs(backlog): remove shipped dynamic flags feature
ademboukabes Oct 2, 2026
b2c6316
fix(generate): remove stray .env.example and add TODO for dynamic ins…
ademboukabes Oct 2, 2026
1708b97
Merge pull request #16 from MicroClub-USTHB/monitoring/scrape-config-…
ademboukabes Oct 2, 2026
ab35c1a
docs(spec): document prometheus scrape config generator in spec
ademboukabes Oct 2, 2026
55854ba
fix(generate): conditionally emit prometheus config
ademboukabes Oct 2, 2026
ec8dace
refactor(generate): remove unused removed return from Apply()
ademboukabes Oct 2, 2026
0b180fa
test(generate): add tests for prometheus generator
ademboukabes Oct 2, 2026
98b6fe8
Merge pull request #26 from MicroClub-USTHB/feat/dynamic-flags
ademboukabes Oct 2, 2026
cd2024f
docs(spec): add v0.1 changelog with all features shipped on develop
ademboukabes Oct 2, 2026
e5c8eda
fix(instancer): use filepath.Join for compose and slug paths
ademboukabes Oct 2, 2026
1691d6b
docs(contributing): update package layout + fix stale workflow refere…
ademboukabes Oct 2, 2026
96ce890
feat: add Kubernetes deployment support with planning and manifest ge…
Rassimdou May 31, 2026
b268ffa
fix(k8s): address blockers and production readiness review
ademboukabes Oct 2, 2026
d4910d2
feat(k8s): harden deploy pipeline, nodeport allocation, and security …
ademboukabes Oct 3, 2026
44e5cbd
fix(validate): ignore dynamic and empty flags in uniqueness check U003
ademboukabes Oct 7, 2026
a7fce3e
fix(validate): parse host port properly when bound to specific IP in …
ademboukabes Oct 7, 2026
e735ae9
fix(build): run leak scan before pushing images to remote registry
ademboukabes Oct 7, 2026
c888748
fix(deploy): rewrite only build service and prevent duplicate keys in…
ademboukabes Oct 7, 2026
9a0ccad
fix(instancer): use forward slash for logical challenge slug on all p…
ademboukabes Oct 7, 2026
d0cc02a
perf(instancer): unlock global mutex during container compose up
ademboukabes Oct 7, 2026
0154019
fix(ingress): preserve explicit container_name and select service exp…
ademboukabes Oct 7, 2026
37d6587
Merge pull request #27 from MicroClub-USTHB/feat/k8s-deploy-fixed
MoussaabBadla Oct 11, 2026
52b4866
feat(monitoring): mctf monitoring up/down brings up prometheus + graf…
MoussaabBadla Oct 11, 2026
7a3719f
Merge pull request #28 from MicroClub-USTHB/feat/monitoring-up
MoussaabBadla Oct 11, 2026
76cbaf1
feat(deploy): pin deploys to immutable literal image tags instead of …
MoussaabBadla Oct 11, 2026
cd805f4
Merge pull request #29 from MicroClub-USTHB/feat/image-tag-pinning
MoussaabBadla Oct 11, 2026
499e762
docs: add short command reference (all deploy modes, monitoring, inst…
MoussaabBadla Oct 11, 2026
b17195b
Merge pull request #30 from MicroClub-USTHB/docs/commands-reference
MoussaabBadla Oct 11, 2026
06a6d4a
feat(instance): list reads from the remote instancer API when instanc…
MoussaabBadla Oct 11, 2026
5fc7db2
Merge pull request #31 from MicroClub-USTHB/feat/instance-remote-client
MoussaabBadla Oct 11, 2026
bc4ddda
feat(instance): destroy via remote instancer API; deprecate built-in …
MoussaabBadla Oct 11, 2026
b5879d4
Merge pull request #32 from MicroClub-USTHB/feat/instance-remote-destroy
MoussaabBadla Oct 11, 2026
384dcf3
feat: goreleaser-based cross-platform releases (binaries, deb/rpm, ho…
MoussaabBadla Oct 11, 2026
c8b7954
Merge pull request #33 from MicroClub-USTHB/feat/goreleaser-distribution
MoussaabBadla Oct 11, 2026
4589957
feat: publish ghcr.io docker image of mctf via goreleaser
MoussaabBadla Oct 12, 2026
2fec506
Merge pull request #34 from MicroClub-USTHB/feat/docker-image
MoussaabBadla Oct 12, 2026
a4f3149
feat: generate man pages (mctf gen-man) and bundle them in releases
MoussaabBadla Oct 12, 2026
781b7a3
Merge pull request #35 from MicroClub-USTHB/feat/man-pages
MoussaabBadla Oct 12, 2026
6f9724f
docs: add architecture overview (package map, pipeline, deploy modes,…
MoussaabBadla Oct 12, 2026
5046cf2
Merge pull request #36 from MicroClub-USTHB/docs/architecture
MoussaabBadla Oct 12, 2026
9fed01b
feat(doctor): D043 warns on committed MCTF_* secret values
MoussaabBadla Oct 12, 2026
72f8dde
Merge pull request #37 from MicroClub-USTHB/feat/doctor-secret-scan
MoussaabBadla Oct 12, 2026
98c56ae
feat(plugin): plugin system foundation with before/after_deploy hooks
MoussaabBadla Oct 12, 2026
3742a88
Merge pull request #38 from MicroClub-USTHB/feat/plugin-system
MoussaabBadla Oct 12, 2026
5837fc8
test: add fuzz targets for compose port and manifest parsers
MoussaabBadla Oct 12, 2026
5cf83ee
Merge pull request #43 from MicroClub-USTHB/test/fuzz-parsers
MoussaabBadla Oct 12, 2026
679a066
chore: open-source hygiene — SECURITY, CODE_OF_CONDUCT, issue/PR temp…
MoussaabBadla Oct 12, 2026
8903868
Merge pull request #55 from MicroClub-USTHB/chore/oss-readiness
MoussaabBadla Oct 12, 2026
67eb99e
docs: public-facing README (accurate shipped feature set, install, co…
MoussaabBadla Oct 12, 2026
4f0baa7
Merge pull request #56 from MicroClub-USTHB/docs/public-readme
MoussaabBadla Oct 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Something isn't working as expected
title: ""
labels: bug
---

## What happened

A clear description of the bug.

## Steps to reproduce

1. `mctf ...`
2. ...

## Expected vs actual

- Expected:
- Actual:

## Environment

- `mctf version` output:
- OS / arch:
- Deploy mode (docker / ssh / kubernetes), if relevant:
- Docker / kubectl version, if relevant:

## Logs

```
paste relevant output (redact any tokens)
```
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Security vulnerability
url: https://github.com/MicroClub-USTHB/mctf-cli/security/advisories/new
about: Please report security issues privately — see SECURITY.md, not a public issue.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Feature request
about: Propose a new capability or improvement
title: ""
labels: enhancement
---

## Problem / motivation

What are you trying to do that MCTF doesn't support today, and why?

## Proposed solution

What should the command / config / behavior look like? Include an example
invocation or config snippet if you can.

## Alternatives considered

Other approaches, and why this one.

## Scope

- Which area? (build / deploy / instancer / platform / monitoring / plugins / docs / …)
- Rough size, if known.
26 changes: 26 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## What

Brief description of the change and why.

Closes #

## How

Key implementation points / decisions.

## Verification

- [ ] `go build ./...`
- [ ] `go test ./...`
- [ ] `golangci-lint run ./...`
- [ ] `mctf generate --check` on the sample event (if derived files could change)
- [ ] Docs updated (`docs/spec/`, CHANGELOG) if behavior/CLI changed
- [ ] Schema + `make schemas` synced (if on-disk shape changed)

## Notes

Anything reviewers should know (follow-ups, out-of-scope, risks).

---

<!-- PRs target `develop`, not `main`. One concern per PR — see CONTRIBUTING.md. -->
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: ci

on:
push:
branches: [main, production]
branches: [main, develop, production]
pull_request:
branches: [main, production]
branches: [main, develop, production]

jobs:
lint:
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release

on:
push:
tags: ["v*"]

permissions:
contents: write # create the GitHub release + upload artifacts
packages: write # push the Docker image to GHCR

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # full history for the changelog

- uses: actions/setup-go@v5
with:
go-version: "1.23"

- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: goreleaser/goreleaser-action@v6
with:
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Optional: set this secret (write access to MicroClub-USTHB/homebrew-tap)
# to publish the Homebrew cask. Without it the cask push is skipped.
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ Thumbs.db
/dist/
*.test
*.out

# goreleaser build output
dist/

# generated man pages (built at release time)
manpages/
109 changes: 109 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# goreleaser configuration for the mctf CLI.
# Cuts cross-platform binaries, archives, checksums, Linux packages, and a
# Homebrew formula on every `vX.Y.Z` tag. Run `goreleaser check` to validate
# and `goreleaser release --snapshot --clean` for a dry run.
version: 2

project_name: mctf

# Generate man pages before building so the archives can bundle them.
before:
hooks:
- sh -c 'mkdir -p manpages && go run . gen-man manpages'

builds:
- id: mctf
main: .
binary: mctf
env:
- CGO_ENABLED=0
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
# Match the Makefile's ldflags: version/commit/date live in package cmd.
ldflags:
- -s -w
- -X github.com/MicroClub-USTHB/mctf-cli/cmd.version={{ .Version }}
- -X github.com/MicroClub-USTHB/mctf-cli/cmd.commit={{ .ShortCommit }}
- -X github.com/MicroClub-USTHB/mctf-cli/cmd.date={{ .Date }}

archives:
- id: mctf
formats: [tar.gz]
name_template: >-
{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}
format_overrides:
- goos: windows
formats: [zip]
files:
- src: manpages/*.1
dst: man
info:
mode: 0644

checksum:
name_template: checksums.txt

# Docker image of the CLI itself, pushed to GHCR (for CI pipelines).
# amd64 only for now; multi-arch can follow with buildx + docker_manifests.
dockers:
- image_templates:
- "ghcr.io/microclub-usthb/mctf:{{ .Version }}"
- "ghcr.io/microclub-usthb/mctf:latest"
dockerfile: Dockerfile
goos: linux
goarch: amd64
build_flag_templates:
- "--label=org.opencontainers.image.title=mctf"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.source=https://github.com/MicroClub-USTHB/mctf-cli"
- "--label=org.opencontainers.image.licenses=MIT"

# Linux packages (.deb / .rpm) attached to the release.
nfpms:
- id: mctf
package_name: mctf
maintainer: MicroClub-USTHB <https://github.com/MicroClub-USTHB>
description: MCTF — Modern CTF Framework CLI
license: MIT
homepage: https://github.com/MicroClub-USTHB/mctf-cli
formats: [deb, rpm]
contents:
- src: manpages/*.1
dst: /usr/share/man/man1

# Homebrew cask pushed to MicroClub-USTHB/homebrew-tap (installs the binary).
# Requires a HOMEBREW_TAP_TOKEN secret with write access to that repo.
homebrew_casks:
- name: mctf
# Skip the tap push until HOMEBREW_TAP_TOKEN is configured, so a release
# still succeeds (binaries/packages publish) before the tap is set up.
skip_upload: "{{ if .Env.HOMEBREW_TAP_TOKEN }}false{{ else }}true{{ end }}"
repository:
owner: MicroClub-USTHB
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_TOKEN }}"
homepage: https://github.com/MicroClub-USTHB/mctf-cli
description: MCTF — Modern CTF Framework CLI
# Strip the quarantine attribute so the unsigned binary runs on macOS.
hooks:
post:
install: |
if system_command("/usr/bin/xattr", args: ["-h"]).exit_status == 0
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/mctf"]
end

changelog:
use: git
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
- "^chore:"
- "^ci:"
- "Merge pull request"

release:
draft: false
prerelease: auto
57 changes: 57 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes
- Focusing on what is best for the overall community

Examples of unacceptable behavior:

- The use of sexualized language or imagery, and sexual attention or advances
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards and
will take appropriate and fair corrective action in response to any behavior
that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders at [MicroClub USTHB](https://github.com/MicroClub-USTHB).
All complaints will be reviewed and investigated promptly and fairly.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
<https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>.

[homepage]: https://www.contributor-covenant.org
Loading
Loading