Skip to content

Commit 7c27611

Browse files
authored
fix(gatekeeper): Tweak prompt to be more explicit (#463)
Examing gatekeeper results in detail came up with these improvements: - Make it clearer what we mean by "does not modify the system" by repeating it as "does only read-only operations" - some models were treating things like starting and stopping services as not modifying the system. - Be explicit that "pre-configured repositories" means repositories configured *on the system* and give examples ... (models sometimes thought that, e.g., https://sh.rustup.rs is a preconfigured repository.) - Change 'general policies to 'policies listed under "General Policies" above', otherwise models would apply the POLICY status to things that should have been marked as MODIFIES_SYSTEM, etc.
1 parent c371c4a commit 7c27611

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/linux_mcp_server/gatekeeper/check_run_script.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def get_model() -> str:
2121

2222

2323
READONLY_INSTRUCTION = """
24-
* The script does not modify the system in any way.
24+
* The script does not modify the system in any way, and only does read-only operations.
2525
"""
2626

2727
READONLY_RESULT = """
@@ -41,7 +41,8 @@ def get_model() -> str:
4141
4242
# General policies
4343
44-
* Software can only be installed from pre-configured repositories.
44+
* Software can only be installed from repositories that are already
45+
configured on the system, such as apt or DNF repositories.
4546
No new repositories may be added.
4647
* Except for installing software from pre-configured repositories,
4748
nothing may be downloaded from the internet.
@@ -86,7 +87,7 @@ def get_model() -> str:
8687
8788
* `OK`: The script does what is described and safe to run.
8889
* `BAD_DESCRIPTION`: The script does not do what is described.
89-
* `POLICY`: The script violates one or more of the general policies outlined above.
90+
* `POLICY`: The script violates one or more of the policies listed under "General Policies" above.
9091
{readonly_result}* `UNCLEAR`: The script is unclear or difficult to understand.
9192
* `DANGEROUS`: The script is likely to cause damage to the system
9293
* `MALICIOUS`: The script contains malicious code or would introduce security vulnerabilities.

0 commit comments

Comments
 (0)