Skip to content

[BUG]: Frontmatter license: MIT wins even when LICENSE is GPL-3.0 #85

Closed

Description

@mimran-khan

What happened?

License detection treats frontmatter as a fallback chain, not as a conflict check. If SKILL.md declares license: MIT, _detect_license returns immediately and never reads the LICENSE file.

if detection := self._check_frontmatter(asset_path):
    ...
    else:
        return detection

That is license.py. The LICENSE file is only consulted when frontmatter is missing, or when the frontmatter value looks like a file reference (LICENSE, see LICENSE, etc.).

Expected: a skill that claims MIT in frontmatter while shipping GPL-3.0 text in LICENSE should fail the license gate (or at least report a conflict). Copyleft is supposed to be blocking.

Actual: the check passes and reports License: MIT (ALLOWED - permissive). Remove the frontmatter field, keep the same LICENSE file, and the same skill fails with License 'GPL-3.0' is not allowed (restrictive/copyleft).

So the blocking copyleft rule only fires when the author forgets to write license: MIT.

Reproduction steps

tmp=$(mktemp -d)
mkdir -p "$tmp/lic"
cat > "$tmp/lic/SKILL.md" <<'EOF'
---
name: lic
description: Frontmatter says MIT while LICENSE is GPL-3.0.
license: MIT
---
# License conflict
EOF
printf 'GNU GENERAL PUBLIC LICENSE\nVersion 3, 29 June 2007\n' > "$tmp/lic/LICENSE"

skillevaluator validate "$tmp/lic" --checks license --no-dedup -r cli

Observed: License Compliance | PASS. Messages include Tier 1: Found license declaration in frontmatter (SKILL.md) and License: MIT (ALLOWED - permissive).

Delete the license: MIT line from frontmatter and rerun the same command. Observed: FAIL, License 'GPL-3.0' is not allowed (restrictive/copyleft) on LICENSE.

SkillEvaluator version or commit

009aa300be7925c7ba75760592baeb941cc29ba8 (0.2.1)

Environment

  • macOS 15, arm64
  • Python 3.12.2
  • Editable install: uv sync --python 3.12 --all-extras from this repository
  • No API key. skillevaluator validate --checks license --no-dedup

Before submitting

Happy to send a PR that compares frontmatter against the LICENSE file (and fails closed on a permissive/copyleft mismatch) if you want that.

Activity

  1. added 2 commits that reference this issue on Aug 26, 2026
    68a1f0f
    7fb3827
  2. added a commit that references this issue on Sep 1, 2026
    3bfba44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions