Skip to content

Enhance FOSS Compliance and OSSF Scorecard Posture - #368

Merged
dwolfson merged 7 commits into
odpi:mainfrom
dwolfson:fix/ci-test-isolation
Sep 16, 2026
Merged

dwolfson merged 7 commits into
odpi:mainfrom
dwolfson:fix/ci-test-isolation

Conversation

@dwolfson

Copy link
Copy Markdown
Member

This PR significantly enhances the repository's alignment with open-source best practices, specifically targeting a high OSSF Scorecard score and improved community health. It introduces automated security checks, supply-chain transparency (SBOMs), and formalized governance documentation.

Key Changes

1. Security Automation & Supply Chain

  • OSSF Scorecard Action: Added .github/workflows/scorecard.yml (pinned to stable SHA) to automatically analyze the project's security posture.
  • SBOM Generation: Integrated cyclonedx-py into the release workflow to generate CycloneDX SBOMs (JSON and XML) for every release.
  • Continuous Integration: Added python-tests.yml to run unit tests on every Pull Request and push to main, ensuring baseline code quality.
  • Security Policy: Completed the SECURITY.md file and documented the SBOM and vulnerability reporting process.
  • Dependency Management: Restricted supported Python versions to >=3.12, <3.14 in pyproject.toml to resolve resolution conflicts and refreshed uv.lock.

2. Community Health & Governance

  • Code of Conduct: Added CODE_OF_CONDUCT.md aligned with ODPi Egeria, including modern sections on responsible AI usage.
  • Governance: Added GOVERNANCE.md to clarify decision-making processes.
  • Contribution Guidelines: Enhanced CONTRIBUTING.md with explicit Developer Certificate of Origin (DCO) instructions and Signed-off-by requirements.
  • Attribution: Added CITATION.cff for academic and professional attribution.
  • Ownership: Added CODEOWNERS to formalize review responsibilities.

3. Test Isolation & CI Reliability

  • Manual Script Isolation: Renamed manual scripts in tests/micro-tests/ to manual_*.py to prevent them from being picked up by pytest during automated runs, resolving "file not found" errors in CI.
  • Unit Test Marking: Updated tests/micro-tests/conftest.py to automatically mark all tests in that directory as unit, ensuring correct test selection with pytest -m unit.

4. Visibility

  • README Badges: Added a comprehensive suite of badges for OSSF Scorecard, Python Tests, CII Best Practices, Governance, and Code of Conduct.

Checklist

  • All commits are signed off (DCO compliant).
  • GitHub Actions workflows for testing and security analysis added.
  • Documentation for community health and security updated.
  • Dependencies for SBOM generation integrated into workflows.
  • Merged latest upstream changes and resolved conflicts in uv.lock.

Verification Results

  • Unit Tests: uv run pytest tests/micro-tests/ -m unit passes locally.
  • Workflow Syntax: Validated the YAML structure for all new GitHub Actions.
  • Dependency Resolution: Confirmed that uv lock succeeds with the new version constraints.

dwolfson and others added 7 commits September 13, 2026 15:59
Co-authored-by: Junie <junie@egeria-project.org>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
- Add OSSF Scorecard and Python Tests GitHub Actions.
- Add academic attribution (CITATION.cff).
- Enhance CONTRIBUTING.md with DCO/sign-off requirements.
- Add SBOM generation to release workflow using cyclonedx-py.
- Update README.md with health and security badges.
- Complete SECURITY.md with SBOM information.
- Include community health files (Governance, Code of Conduct).

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Co-authored-by: Junie <junie@jetbrains.com>
- Restrict supported Python versions to '>=3.12, <3.14' to avoid resolution conflicts
- Remove cyclonedx-py from dev dependencies as it is invoked via uvx
- Refresh uv.lock with updated dependencies
- Pin ossf/scorecard-action to a stable SHA to resolve Docker pull issues
- Update python-tests.yml to use Python 3.12/3.13 and target micro-tests
- Clean up old help documents in sample-data/egeria-inbox/

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Co-authored-by: Junie <junie@jetbrains.com>
Rename manual scripts in tests/micro-tests to prevent them from being
collected by pytest during CI. Update conftest.py to automatically
mark all tests in the micro-tests directory with the 'unit' marker.
This ensures that 'pytest -m unit' correctly selects only the intended
unit tests and avoids failures due to missing files or top-level execution
in manual scripts.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Co-authored-by: Junie <junie@jetbrains.com>
Switch from 'cyclonedx-py pyproject' (invalid command) to 'cyclonedx-py environment'
using the recommended 'cyclonedx-bom' source. This ensures accurate SBOM
generation by scanning the installed environment instead of the manifest file.
Updates both python-tests and release workflows.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Co-authored-by: Junie <junie@jetbrains.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Co-authored-by: Junie <junie@jetbrains.com>
@dwolfson
dwolfson merged commit ca2c0b3 into odpi:main Sep 16, 2026
8 checks passed
dwolfson added a commit that referenced this pull request Sep 16, 2026
…on it (#371)

pypa/gh-action-pypi-publish globs dist/* by default and tries to upload
every file there to PyPI as a distribution artifact. The "Generate SBOM"
step (added in #368) wrote bom.json/bom.xml straight into dist/ alongside
the real wheel/sdist, so the publish step's pre-upload check failed on
bom.json ("InvalidDistribution: Unknown distribution format") and aborted
before uploading anything -- confirmed live on the v6.1.16 tag push, the
first release run since that step was added. Write the SBOM to its own
sbom/ directory instead, and attach both dist/* and sbom/* to the GitHub
Release.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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