Skip to content

chore(ci): add GitHub issue/PR templates and lint workflow - #23

Merged
HackedRico merged 1 commit into
mainfrom
chore/github-configs
Aug 27, 2026
Merged

chore(ci): add GitHub issue/PR templates and lint workflow#23
HackedRico merged 1 commit into
mainfrom
chore/github-configs

Conversation

@HackedRico

Copy link
Copy Markdown
Collaborator

Description

Ports the shared MITRE Caldera plugin .github baseline into this plugin, matching what mitre/training, stockpile, and atomic already use:

  • ISSUE_TEMPLATE/ (bug report, feature request, question, config)
  • pull_request_template.md
  • workflows/greetings.yml (first-interaction bot)
  • workflows/stale.yml (60 day stale, 60 day close)

Action versions stay SHA pinned, as upstream has them. The assignees: front matter was dropped from all three issue templates so issues do not auto assign to an upstream maintainer.

Two adaptations for this repo:

No JavaScript lint. Training's javascript-lint.yml runs npm ci && npm run lint. There is no package.json or lockfile here, so that would fail on its first step. The Vue sources under gui/ are consumed by Caldera's frontend rather than built as their own npm project. Replaced with python-lint.yml, which reflects what this plugin actually is.

Lint gate is narrow on purpose. The hard gate runs flake8 --select=E9,F63,F7 (syntax errors). The full sweep runs with --exit-zero so it reports without blocking, since the existing tree has roughly 400 style findings. F82 (undefined names) is left out of the gate for now: a dead legacy path in app/capabilities/rag.py trips it, and cleaning that up belongs in its own change. Add F82 back to the gate once it is gone.

.flake8 mirrors caldera core's own config (max-line-length = 180) plus excludes for the vendored data and taxonomy directories. Without it the advisory sweep reports 1419 findings against flake8's default 79 char limit instead of 399.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • flake8 . --select=E9,F63,F7 --show-source --statistics exits 0 against this branch, so the gate is green on first run.
  • All four workflow and config YAML files parse with yaml.safe_load.
  • Advisory sweep confirmed to report without failing the job.

No test workflow is included yet. tests/test_relation_extractor.py imports plugins.mcp.app.utilities.cti_relation_extractor, which no longer exists, so pytest currently fails at collection. Worth fixing separately before adding a test job.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Port the shared MITRE Caldera plugin .github baseline (mitre/training,
stockpile, atomic): issue templates, PR template, first-interaction
greeting and stale-bot workflows, with SHA-pinned actions.

The training repo's javascript-lint workflow has no counterpart here --
the Vue sources under gui/ are not an npm project, so npm ci would fail
on step one. Replaced with a flake8 workflow matching what this plugin
actually is. The hard gate covers syntax errors only; the wider style
sweep runs with --exit-zero until the existing violations are cleared.
@HackedRico
HackedRico marked this pull request as ready for review August 27, 2026 00:39
@HackedRico
HackedRico merged commit 606964b into main Aug 27, 2026
4 checks passed
@HackedRico
HackedRico deleted the chore/github-configs branch August 27, 2026 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant