← Back to issue list

Add a linter for staged libraries included in the base snap

View original Github issue

Metadata

Project
snapcraft
Number
#4149
Type
issue
State
open
Author
sergiusens
Labels
Status: Triaged Type: Enhancement
Created
Updated
Closed

Current evaluation

Feature request to add a linter that flags libraries in a snap that are already provided by the base snap, reducing snap size and security surface. Labeled Status: Triaged and Type: Enhancement by maintainer sergiusens. No implementation found in the codebase yet.

Suggested action: keep open

Reason: The issue is labeled Status: Triaged and Type: Enhancement, indicating it has been assessed by a maintainer. It references PR #3413 as the basis for implementation, and the linters infrastructure has been actively developed (gpu linter #5985, metadata linter #5610, missing library linter #3872). No base-snap linter exists yet in the codebase, so the feature remains unimplemented and relevant.

Impact: 50 Quick Win: 20.0 Staleness: 65 Complexity: 60 Confidence: 75 Support Request: 0

Issue body

### What needs to get done Add a linter that can display any libraries in a snap that are also provided by the base snap. The bases for this implementation are https://github.com/snapcore/snapcraft/pull/3413 (described in item 3 https://github.com/snapcore/snapcraft/pull/3413#issuecomment-909104850) ### Why it needs to get done This reduces the surface area of a snap from a security standpoint and makes the snap smaller. A `stage-packages` entry will always stage a package, even if it is included by the base snap. This may be intentional but usually it isn't.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 50
Quick Win: 20.0
Staleness: 65
Complexity: 60
Confidence: 75
Support Request: 0
keep open Feature request to add a linter that flags libraries in a snap that are already provided by the base snap, reducing snap size and security surface. Labeled Status: Triaged and Type: Enhancement by maintainer sergiusens. No implementation found in the codebase yet.
qwen/qwen3.6-35b-a3b
Staleness: 80
Complexity: 40
Confidence: 70
Support Request: 10
close stale Enhancement request to add a linter detecting libraries duplicated in base snaps. Triaged but inactive for over a year with only automated Jira sync comments.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 45
Confidence: 65
Support Request: 5
keep open Enhancement to add a linter detecting staged libraries already provided by the base snap. Issue is triaged and scoped but has been inactive for over a year, awaiting prioritization.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 50
Confidence: 70
Support Request: 10
close stale Linter to detect base snap libraries unnecessarily staged via stage-packages, improving security and reducing size. Triaged but inactive for over a year, awaiting implementation or assignment.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#4028 (confidence 80%)

    The unused libraries linter (#4028) is closely related — it checks for libraries in the snap that aren't used, while this issue checks for libraries that duplicate the base snap. Both aim to reduce snap size.

Related issues

Issue Project State Summary Similarity
#4028 linters: add linter check for unused libraries snapcraft merged Merged following reviewer approval and successful CI checks. Adds a linter warning to flag unused libraries packaged into snaps. The update modifies 22 files with 449 additions and 40 deletions across five commits.
73%