Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interfaces, o/ifacestate: don't allow devmode snaps calling other snaps on UC22 #11408

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

anonymouse64
Copy link
Member

Eventually we will also disable this behavior of being able to call snap-confine from a devmode snap
for all other systems, but for now we can only get away with disabling UC22.

Also add missing unit tests from the branch we didn't have time to write/prepare.

…/behavior

These unit tests were missing from the CVE branch, so proposing them now
instead.

Also fix a typo which we didn't have time to properly address while preparing
the branch in private.

Signed-off-by: Ian Johnson <[email protected]>
…ps on UC22

No customers can be depending on this behavior for UC22 since it isn't released
yet so we can safely disable this unconditionally before anyone has a chance to
depend on it.

Signed-off-by: Ian Johnson <[email protected]>
@anonymouse64 anonymouse64 added Simple 😃 A small PR which can be reviewed quickly Test Robustness labels Feb 18, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #11408 (3a3e11f) into master (f0ff569) will increase coverage by 0.02%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11408      +/-   ##
==========================================
+ Coverage   78.34%   78.37%   +0.02%     
==========================================
  Files         931      931              
  Lines      107005   107023      +18     
==========================================
+ Hits        83838    83881      +43     
+ Misses      17951    17924      -27     
- Partials     5216     5218       +2     
Flag Coverage Δ
unittests 78.37% <50.00%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
interfaces/ifacetest/backendtest.go 0.00% <0.00%> (ø)
overlord/ifacestate/helpers.go 76.07% <33.33%> (-0.46%) ⬇️
interfaces/apparmor/backend.go 84.37% <100.00%> (+6.36%) ⬆️
overlord/hookstate/hookmgr.go 74.67% <0.00%> (-0.65%) ⬇️
overlord/ifacestate/handlers.go 64.87% <0.00%> (-0.15%) ⬇️
daemon/api_connections.go 93.58% <0.00%> (+0.53%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f0ff569...3a3e11f. Read the comment docs.

@pedronis pedronis removed the Simple 😃 A small PR which can be reviewed quickly label Feb 18, 2022
Copy link
Collaborator

@pedronis pedronis left a comment

Choose a reason for hiding this comment

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

trying to capture a model so early in the backend is problematic.

@@ -77,6 +78,8 @@ type Backend struct {

coreSnap *snap.Info
snapdSnap *snap.Info

model *asserts.Model
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is problematic because it will not be set during early first boot, it's not an issue for current usage but once it's there we might grow other usages and it will be confusing to keep in mind when it is set and when it is not. We need to discuss/find a different approach to have the relevant information available.

@anonymouse64
Copy link
Member Author

I will split off the other unit tests into a separate PR, I was probably too self-confident in thinking the model stuff would not be complex

@anonymouse64
Copy link
Member Author

Other unit tests split out into #11409

@pedronis pedronis self-assigned this Mar 24, 2022
@ernestl
Copy link
Collaborator

ernestl commented Feb 27, 2024

@pedronis do we want to pursue this any further?

@pedronis
Copy link
Collaborator

@pedronis do we want to pursue this any further?

yes, this and a related problem are on my/our tech debt list. Finding time/timing time is complicated though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants