Skip to content

chore: use the service contact address - #435

Merged
uniqueg merged 2 commits into
devfrom
chore/service-contact
Oct 23, 2026
Merged

uniqueg merged 2 commits into
devfrom
chore/service-contact

Conversation

@uniqueg

@uniqueg uniqueg commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Contacts: [email protected], named as ELIXIR On-Cloud, replaces the personal address in the pyproject.toml authors and maintainers and in info.contact of the access control API specification. Alexander Kanitz stays listed as author by name (pyproject.toml, without e-mail; CITATION.cff as before).
  • Image labels: OCI annotations (org.opencontainers.image.title, description, url, source, documentation, licenses, authors, vendor) replace the custom software.* labels and the deprecated maintainer and maintainer.organisation labels in docker/Dockerfile and the example Dockerfiles. The workflows add no labels (no docker/metadata-action), so no value is lost. The example images set all of their own, as they would otherwise inherit those of the FOCA image.
  • Test: tests/test_repository.py checks that no tracked file has e-mail addresses other than the service address, the GA4GH address of the vendored service-info specification and example addresses (example.org etc.), like the existing check of CITATION.cff; it also finds addresses with internationalized domain names (Sourcery).

Light lane: metadata, image labels and a self-contained repository test only, no logic; the reviewer subagents were skipped and I reviewed the diff myself.

Verification

  • pytest tests/test_repository.py: fails on dev (6 lines with the personal address), passes on this branch
  • pytest tests/test_repository.py tests/test_citation.py tests/test_version.py tests/utils: 382 passed
  • ruff check, ruff format --check, mypy, ast-grep scan, pre-commit run on the changed files: pass
  • The full test suite needs MongoDB and runs in CI
  • CI: all checks pass, also after the Sourcery fix (unit tests on all Python and MongoDB versions, lint, docs, image scans, petstore integration tests, charts on kind)

Open questions

None.

Closes #434

🤖 Generated with Claude Code

Use [email protected], named as ELIXIR On-Cloud, as the
contact in the package metadata and the access control API
specification, instead of the personal address. Alexander Kanitz stays
listed as author by name.

Replace the custom and deprecated `maintainer` image labels with OCI
annotations (`org.opencontainers.image.*`) in the FOCA image and the
example images. The workflows add no labels, so the Dockerfiles keep
all static values; the example images set their own, as they would
otherwise inherit those of the FOCA image.

Add a test that no tracked file has e-mail addresses other than the
service address, the GA4GH address of the vendored specification and
example addresses.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sourcery-ai

sourcery-ai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Updates project, API, and container metadata to use the ELIXIR On-Cloud service contact, migrates Docker labels to OCI annotations with explicit metadata for derived images, and adds a tracked-file scan to prevent personal email addresses from returning.

Flow diagram for repository email address validation

flowchart TD
    Files[Tracked repository files] --> Scan[tests/test_repository.py]
    Scan --> Allowed{Allowed address?}
    Allowed -->|Service or documented example address| Pass[Pass]
    Allowed -->|Personal address| Fail[Fail]
Loading

File-Level Changes

Change Details Files
Replace personal contact metadata with the ELIXIR On-Cloud service address while preserving Alexander Kanitz as a name-only author.
  • Update package authors and maintainers in project metadata.
  • Update the access-control OpenAPI contact information.
  • Leave citation metadata unchanged except for the documented name-only author representation.
pyproject.toml
foca/security/access_control/api/access-control-specs.yaml
Standardize container image metadata on OCI annotation labels and define complete metadata for derived example images.
  • Replace custom software and deprecated maintainer labels with OCI-standard title, description, URL, source, documentation, license, author, and vendor labels.
  • Add explicit example-image metadata so labels are not inherited from the FOCA base image.
  • Use the service contact in image author metadata.
docker/Dockerfile
examples/petstore-access-control/Dockerfile
examples/petstore/Dockerfile
Add a repository-level regression test that prevents reintroduction of unauthorized email addresses.
  • Enumerate tracked files with Git and scan readable text files for email addresses.
  • Allow only the service address, the vendored GA4GH address, and reserved example domains.
  • Report offending file and address locations through an assertion failure.
tests/test_repository.py

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov

codecov Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (2c0cfa6) to head (4148b3e).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #435   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           27        27           
  Lines         2869      2869           
=========================================
  Hits          2869      2869           
Flag Coverage Δ
test_unit 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@uniqueg
uniqueg marked this pull request as ready for review October 23, 2026 11:41

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="tests/test_repository.py" line_range="10" />
<code_context>
+ROOT = Path(__file__).resolve().parents[1]
+
+# E-mail addresses, with a domain name of valid labels
+EMAIL = re.compile(
+    r"[\w.%+-]+@((?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z]{2,})",
+    re.IGNORECASE,
</code_context>
<issue_to_address>
**Internationalized contacts evade scan**

When a tracked file contains an email address with an internationalized domain, `EMAIL` excludes non-ASCII domain labels, so `finditer` skips valid addresses such as `person@bücher.example.org` and the repository test passes while a personal address remains tracked.

Use a detector that recognizes internationalized domains (for example, normalize domain labels with IDNA) before applying the address allowlist.
</issue_to_address>

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: tests/test_repository.py:10


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread tests/test_repository.py Resolved
Also find e-mail addresses whose domain names have non-ASCII labels, so
that internationalized addresses don't evade the repository check.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@uniqueg
uniqueg merged commit 004fe8e into dev Oct 23, 2026
22 checks passed
@uniqueg
uniqueg deleted the chore/service-contact branch October 23, 2026 11:53
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