Skip to main content

Reading a file from resources

Simple Story

The exercise hands out one data sheet and the pupil has to read it. Nothing else in the room should become readable.

This page is a stub

The outline below is the intended structure and is not yet written. Until it is, use the Policy Reference for the individual fields.

The situation​

A test fixture or the exercise itself needs one file from src/main/resources or src/test/resources, and the policy must permit exactly that path.

The policy fragment​

The smallest security-policy.yaml addition that solves it, shown in full so it can be pasted into an existing policy.

What this still forbids​

The operations the recipe deliberately does not enable, so the boundary stays visible.

The tempting wrong version​

Granting read access to the whole resources directory, or to ., which makes every other exercise file readable too.

Notes​

  • Check the recipe against both controls: the permitted operation must succeed, and the nearest forbidden neighbour must still be rejected.