Skip to content

Conversation

@vgharini
Copy link
Contributor

@vgharini vgharini commented Oct 6, 2025

No description provided.

Copy link
Contributor

@JustinCappos JustinCappos left a comment

Choose a reason for hiding this comment

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

A few changes are needed...

One critical aspect of creating a reference monitor is to ensure it cannot be bypassed and handles all cases correctly. While not a perfect way of validating your reference monitor, it is useful to create test cases to see whether your security layer will work as expected (the test cases may be turned in as part of the next assignment).


This assignment is intended to reinforce concepts of immutability, access control, and state consistency. By the end, you should understand how to design a security layer that preserves history and enforces tamper resistance.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add some context about what "immutable" means.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added in the new version


## Specifications

1. Your defense monitor should incorporate all the standard file operation methods, from opening a file, reading and writing to it, to closing it. All operations must behave identically to RepyV2 (without your security layer) except as mentioned below.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
1. Your defense monitor should incorporate all the standard file operation methods, from opening a file, reading and writing to it, to closing it. All operations must behave identically to RepyV2 (without your security layer) except as mentioned below.
1. Your defense monitor should incorporate all the standard file operation methods supported in RepyV2, from opening a file, reading and writing to it, listing files, deleting files, and closing them. All operations must behave identically to RepyV2 (without your security layer) except as mentioned below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added in the new version


1. Your defense monitor should incorporate all the standard file operation methods, from opening a file, reading and writing to it, to closing it. All operations must behave identically to RepyV2 (without your security layer) except as mentioned below.
2. You can assume that no files exist when your security layer begins running the application.
3. When a user calls `openfile(filename, True)`, if `filename` already exists, your security layer must create a new “version” of the file that can be opened. This version will be given a new version number and must begin with the contents of the latest version file as its contents.
Copy link
Contributor

Choose a reason for hiding this comment

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

explain what "version" means here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added in the new version

Comment on lines 108 to 109
if create:
self.VMfile = openfile(filename, True)
Copy link
Contributor

Choose a reason for hiding this comment

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

at least see if the file exists with listfiles and then create a version, etc. A little more functionality here would be useful.

def __init__(self, filename, create):
# If a file with the same 'filename' already exists, this creates a new version 'filename.v1'.
# (Incomplete: does not handle further versions like v2, v3, etc.)
if create:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added basic functionality to demonstrate version creation.
I didn’t aim to show the full versioning logic or structure here — just a minimal example.
Since the specification mentions version numbers starting from 1, I implemented a simple case (e.g., filename, filename.v1) to illustrate how it can work.
Added inline comments in the code for clarity.

Copy link
Contributor

@JustinCappos JustinCappos left a comment

Choose a reason for hiding this comment

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

LGTM

@JustinCappos JustinCappos merged commit c17e701 into SeattleTestbed:master Oct 7, 2025
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.

2 participants