Skip to content

Contributing

Michael L. McKnight edited this page Dec 5, 2026 · 2 revisions

Contributing

Canonical source: CONTRIBUTING.md. By taking part you agree to follow the Code of Conduct.

New contributors are welcome. Bug reports, false-positive or false-negative reports, new rules, new languages and documentation fixes all help.

Where to start

Other labels you will see: enhancement, bug, documentation, taint-tracking, configuration, new-language, packaging, accessibility.

Roadmap

Ideas and known gaps; none of these exist yet. Help is welcome on both.

  • Deeper taint tracking: call chains of two or more levels, and calls across files. (Python already follows one level within a file on main; that ships in the next release. v1.4.0 stays inside one function.)
  • A PyPI release, so pip install works without the GitHub URL.

Issues #1–#6 are closed. Their work is on main and ships in the next release: one-level intra-file Python taint (#1, #8), inline suppressions (#2, #14), [tool.code-cleaner] project config (#3, #15), TypeScript (#4, #16), the dead Python 3.9 pins (#5, #7), and Java taint tracking (#6, #18). See the Changelog.

Reporting

  • Bugs: open an issue with the bug template. False positives and missed findings: use the "False positive or missed finding" form. Include the smallest input that shows the problem, the command you ran, and code-cleaner version output.
  • Security vulnerabilities in Code Cleaner itself: do not open a public issue. Email ml.innovations.research.lab@gmail.com with the subject Code Cleaner security, as described in SECURITY.md. The supported line is 1.4.x.
  • Ideas: open an issue with the feature template before writing a large change.

Development setup and tests

git clone https://github.com/ZodiacDog/Code-Cleaner.git
cd Code-Cleaner
python -m venv .venv && . .venv/bin/activate
pip install -e ".[all]"

python -m unittest discover -s tests -t .          # unit, v1.2 and repository tests
python tests/test_all_languages.py                 # smoke test, all languages
python tests/stress_test_suite.py                  # 240 robustness checks (about 30 s)
CODE_CLEANER_NO_TREESITTER=1 python -m unittest tests.test_v12   # fallback path
code-cleaner analyze code_cleaner scripts --fail-on critical    # self-analysis gate used by CI

Python 3.10 is the oldest supported version; do not use syntax or stdlib features newer than 3.10. Run the unit tests both with and without the extras when you touch a parser path. CI runs Python 3.10–3.13, each with a bare and an [all] install.

Making changes

  • Every new rule needs an explicit rule_id, a severity that follows the policy in CONTRIBUTING.md, a suggestion, a CWE for security rules, and tests.
  • After adding or changing rules, run python scripts/gen_rules_doc.py and commit the updated docs/rules.md.
  • Update CHANGELOG.md under an "Unreleased" heading, and the docs if behaviour changes. Only quote numbers from real runs.
  • Keep the public API backward compatible. Keep the core free of third-party dependencies.
  • New source files carry the project name line only. Do not copy personal contact details into new files. Keep existing file headers as they are.

Pull requests and first-time-contributor CI

  1. Fork, create a branch, make focused commits.
  2. Make sure the tests pass locally and CI is green.
  3. Fill in the pull-request template.

If you are a first-time contributor to this repository, GitHub may hold your Actions workflows until a maintainer clicks Approve and run workflows on the pull request. That is a GitHub protection, not a failing test, and it is separate from review and merge. The maintainer will approve the workflows after looking at the changes.

Code Cleaner is licensed under the Apache License 2.0. By submitting a contribution you agree that it is licensed under the same terms (section 5 of the license). Keep the NOTICE file intact.

Credit

Credit follows the commits and the GitHub account on the pull request. Contributors are listed in the git history; see also AUTHORS.md. If someone else also contributed, say so on the pull request so a Co-authored-by trailer can be added.

Clone this wiki locally