PATHSCOPE · Last updated: 2026-10-28

PathScope User Manual

This manual walks through the screens in order, from finding the weak spots of this machine with PathScope to working out where to start fixing them. The screen instructions avoid technical jargon where possible, and the commands are collected in the chapter “Using the command line”.

1. What PathScope is

PathScope finds the “paths” by which an ordinary user on this machine can reach root (administrator privileges) or sensitive data, and shows, with priorities, where fixing is most effective. It is meant for checking machines you manage yourself and test environments.

The analysis is read-only. It does not rewrite settings or files, and it does not fix anything automatically. It shows example fix commands, but whether to run them is up to the user.

Supported OS and where it is included
Runs on Mac (macOS 12 or later) and Linux. On Mac it is included in the distribution file (DMG), and on Linux in the client edition packages (.deb, .rpm, Arch), and both the screen and the commands are available. The server edition has only the command (pathscope). PathScope is a separate app under the Apache License 2.0. It is outside the scope of the RoamSwitch EULA.

2. Installing and launching

PathScope is installed as a separate app with its own icon. Here is how to start it.

EnvironmentHow to start
MacOpen PathScope.app from the distribution file (DMG) and click “Analyze”.
LinuxOpen “PathScope” from the application list and click “Analyze”. From a terminal, run pathscope-gui. The window needs WebKitGTK 4.1, which is installed automatically with deb and rpm. On Arch, install webkit2gtk-4.1 as an optional dependency.
Command lineRun pathscope in a terminal. On Mac it is PathScope.app/Contents/MacOS/pathscope.

When it starts, a window opens with the buttons “Analyze”, “History”, “LLM assist”, “Explain with LLM” and “Settings” along the top. “Explain with LLM” cannot be pressed until a result is shown. PathScope does not open a listening port, and its window does not load external sites.

3. Running an analysis and reading the result

When you click “Analyze”, PathScope gathers the state of this machine, starting from the current user, and analyzes it. It can take from a few seconds to several tens of seconds. When it finishes, the result is saved automatically as one entry in the history.

Steps

  1. Click “Analyze”.
  2. Use the “Path diagram” and the “Path list” to see which user reaches root or confidential data, and by which steps. Circles and squares represent users and destinations, and each line represents one step that raises privilege. The number on a line corresponds to “why that step works” in the table below the diagram.
  3. In “Fix points (in the order to fix them)”, check the places where fixing has the biggest effect. Each item shows its priority (critical, high, medium or low, with a score), the number of paths affected, a suggested fix, and the nearest MITRE ATT&CK technique.
  4. Click “If I fix this?” to re-analyze, as a trial, the paths you would have if that fix point were fixed as suggested. “If I fix them all?” does the same for all the fix points shown. Neither changes this machine.
  5. Read the list of areas that could not be checked, shown below the fix points.
Areas that could not be checked are not “safe”
The range that could not be checked because privileges were insufficient or the referenced target does not exist. It does not mean that “there is no risk” was confirmed, nor that “there is a risk”. For a range marked “may be checkable when run as root”, running again as root may allow it to be checked.

What kinds of paths it finds

Lines of sudoers, doas.conf, and cron in a fixed format are read without using an LLM. Only Linux reads doas.conf and cron. sudoers can normally be read only by root, so it is covered when run as root. Lines that could not be read in a fixed form, such as lines whose aliases cannot be resolved, negations, and wildcards, remain in the range that could not be checked. These can be read with “LLM assist”.

The check for known vulnerabilities uses the data bundled with the app. It covers macOS and the versions of Debian, Ubuntu, RHEL family, SUSE, Arch, and Alpine for which data exists. Others (Debian 11 and earlier, Fedora, and so on) are shown as “unchecked”. It is not a feature that searches for vulnerabilities exhaustively. For a vulnerability whose conditions for exploitation are known, if those conditions do not hold on this device, it is not made into a path. Examples of conditions are the presence of a specific SUID executable, being able to use user namespaces, and being in a state where a specific kernel module can be loaded.

4. History, export, recurring checks

Analysis results are saved automatically as history on this device. Press “History” to open the list, where you can open a result, give it a label (for example “before fix”), or delete it. Select two entries and press “Compare the two selected” to see the paths that disappeared and the paths that were added, and the change in countermeasure points. Use this when comparing before and after a fix.

Analysis results in JSON format saved on other devices can be brought into the history with “Import analysis result”. Select two or more entries in the history and press “Aggregate the selected history” to see the order of devices by high risk and the weaknesses common to several devices.

If it could not be saved to the history, “Could not save to the history: reason” appears under “Analysis premises” in the result.

The analysis result being shown can be saved as “Analysis result (JSON format)”, “Watch targets (JSON)”, “auditd rules (for Linux's audit feature)”, “Rules for RoamSwitch Server (Falco)”, and “Analysis result (SARIF format)”. You choose the save location in the dialog that opens. It only writes out files and does not apply any settings or change this device. Check the contents of the Falco rules and place them in /etc/falco/rules.d/.

This writes a configuration file that analyzes periodically and notifies you when paths have increased since last time.

  1. Show an analysis result and click “Save as the result to compare against”.
  2. Set the “Interval (minutes)” (from 5 to 10080).
  3. On Mac click “Save launchd settings…”, on Linux click “Save systemd settings…”, and choose where to save.
  4. Check the written content, then register it yourself (for example with launchctl load). PathScope does not register it.

Create the baseline file with the same privileges as the scheduled run (root or a regular user). If the baseline is created as root and the scheduled run works as a regular user, an increase in paths in the range that a regular user cannot see cannot be detected. When the privileges differ, a warning is written to standard error, and a notification is also sent if the baseline is root's.

5. Features that use an LLM (optional)

Off by default
The features that use an LLM do not work until you enable them in the settings. Once enabled and used, part of the analysis content is passed to the command of the LLM you chose and to the service behind it. This communication is not covered by RoamSwitch’s “Zero Telemetry”. If you leave it off, PathScope does not send any of the analysis content outside this machine.

Getting it ready

  1. Check “Enable LLM”.
  2. Choose the “LLM to use”. The choices are the commands claude, opencode, codex and agy, and those whose “Status” is “Installed” can be used. If it says “Not found”, install that command first.
  3. Choose “What to send to the LLM when reading settings” (see the table below).
  4. Click “Save”.

In the list, the “Model” and “Timeout (seconds)” can be changed for each LLM. claude is started with command execution and file reading switched off. opencode, codex and agy are treated as ones that cannot be switched off, and cannot be used unless you check “I understand that this LLM cannot be stopped from running commands or reading files”. An LLM that cannot be restricted may read files on its own judgment along the way, and their contents may be sent to the LLM’s service.

Explain with LLM

When you show an analysis result and press “Explain with LLM”, the LLM is asked to write the overall assessment, the priority and reasons for fixes, the meaning of the range that could not be checked, and so on. What is passed is only a summary of the paths, countermeasure points, and the range that could not be checked. The raw collected information (such as lists of file owners and permissions) is not passed. However, the summary includes the user names and file paths that appear in the paths. The LLM's reply is for reference. A person judges the check and the response, and nothing changes automatically based on the reply.

The IP addresses, domains, CVE IDs and hashes the LLM writes are compared with what it was given (the summary of the analysis result). A value that appears nowhere in that material is listed below the explanation on screen under “Values not found in the collected material”, as a possible invention. Only the strings are compared; the LLM is not asked.

LLM assist (reading configuration files)

Configuration files such as sudoers, cron and scripts are written in all sorts of ways, and a program alone sometimes cannot read them. LLM assist has an LLM read such files and look for descriptions that involve root privileges.

  1. Click “LLM assist”. Candidate files to be read are listed with the reason for each (all are selected at first). Candidates include sudoers, cron, systemd and launchd settings, and executables loaded by services that run as root. Uncheck any you do not want to send.
  2. Click “Send the ○ selected to the LLM”. A confirmation of what will be sent appears; read it, then click “Send (confirmed)”.
  3. Check “Items found”, “Files read” and “Files not read (these stay unchecked)” in the result.
  4. Click “Apply and analyze again” to add the items found to the analysis. If you no longer want to use them, delete them from “Saved”.

Only the items the LLM listed that were confirmed to be actually present as a line in the original file are used. Items that could not be confirmed appear only under “For reference” and are not used in the analysis. The confirmation is repeated at every analysis, so an item whose original line has disappeared is no longer used.

What is sentDetails
StandardValues that look like passwords or keys are replaced with “[REDACTED]” before sending. Files such as private keys are not sent. For a large file, only the lines that contain paths or commands are sent.
UnrestrictedA setting for cases where the content does not leave your machine, such as a local LLM (at your own risk). Password hashes and the like are also sent.
What is never sent in either mode
Files whose contents include a private key are not sent, even if the name is different. Keys in known formats, and values with names that indicate a secret such as a password or token, are replaced before sending regardless of the settings. However, because this method finds secrets by name or shape, some secrets may be missed.

6. Using the command line

The same analysis as in the window can be run with the pathscope command. Run with no options, it analyzes the paths from the current user to root. Collection is read-only and does not change the state of the machine.

On Mac, if the app is in the Applications folder, the command is at /Applications/PathScope.app/Contents/MacOS/pathscope. To call it by its short name, run the following in Terminal. After that, pathscope alone works.

sudo mkdir -p /usr/local/bin
sudo ln -sf /Applications/PathScope.app/Contents/MacOS/pathscope /usr/local/bin/pathscope
pathscope
pathscope --json-out=report.json
pathscope --what-if-fix=all
pathscope --baseline=base.json --fail-on=new --notify
pathscope --print-schedule=systemd --interval-min=60
pathscope --export-watch=watch.json --export-auditd=pathscope.rules --export-roamswitch=94-pathscope-watch.yaml
pathscope --format=json
pathscope --sarif-out=report.sarif
sudo pathscope --check-agent-users
pathscope --plain
pathscope --version
pathscope --lang=en
OptionDetails
--json-out=<file>Saves the result as JSON.
--what-if-fix=allRe-analyzes, as a trial, the paths you would have if everything were fixed as suggested. With a number, only that fix point.
--baseline=<file> --fail-on=newCompares with a previous JSON and exits with code 1 if paths have increased. With --notify, a desktop notification (count only) is also shown.
--fail-on=any|new|critical|high|mediumany exits with code 1 when there is at least one path; critical, high and medium do so when there is a fix point at or above that priority.
--print-schedule=launchd|systemdPrints an example of a periodic-run configuration. It does not register it. Use --interval-min to set the interval in minutes.
--format=markdown|plain|json|sarifChooses the format of standard output. With json or sarif, only that data goes to standard output, and progress and notes go to standard error. Only one kind of data can go to standard output, and it cannot be combined with --what-if-*. --json-out=- and --sarif-out=- also write to standard output.
--sarif-out=<file>Saves the result in SARIF 2.1.0 format. The priority of each fix point maps to the level: critical and high become error, medium becomes warning, and low becomes note.
--export-roamswitch=<file>Writes a rule file for the eBPF Runtime Guard (Falco) of RoamSwitch Server. Every rule has the priority WARNING. Check the contents and put the file in /etc/falco/rules.d/ yourself. It does not apply the rules.
--check-agent-usersAnalyzes every account registered in agent_users in the RoamSwitch Server settings, each as a starting point, in one run. The settings file can normally be read only by root, so run it with sudo. It cannot be combined with --baseline or --what-if-*.
--lang=<lang>Chooses the language of the output: ja, en, ko, zh-Hans, zh-Hant, de, fr, es, it or pt. When it is not given, the language comes from the PATHSCOPE_LANG environment variable and then from the OS language, and English is used for a language that is not supported.
--plainPrints the older plain-text layout instead of Markdown. The assumptions of the analysis then go to standard error instead of into the result.
--help / --version--help (-h) shows a description of every option, the exit codes and examples. --version (-V) shows the version.

The output is Markdown, in the order of summary table, paths, countermeasure points, collection range, and analysis assumptions, and can be pasted into notes or tickets as it is. When you change something with --what-if-*, the change is followed by the change from the previous run with --baseline. For the conventional prose form, add --plain.

The exit code is 0 for normal, 1 when a --fail-on condition was met, and 2 for a usage or input/output error. When run as root, it also collects the listeners that root is waiting on directly. Results of reading settings that were saved with LLM assist are also included in the command’s analysis.

If the baseline file cannot be read, or it cannot be compared because the OS, starting point or device differs, the exit code is 2. With --notify, it notifies “PathScope scheduled check is not running: reason”.

The MCP tool get_privilege_escalation_paths of RoamSwitch for Linux runs the installed pathscope with fixed arguments (--lang=en --start=user-name --format=json) and reads the result. It returns the number of paths and their steps, the fix points of critical or high priority, and the areas that could not be checked. It does not return fix commands and never runs them. Even when no path is found, that does not mean the machine is safe if it did not run as root or if some areas could not be checked.

7. Where data is stored, and updates

ItemLocation
Analysis historyOn Mac, ~/Library/Application Support/net.lafine.pathscope/history.sqlite3; on Linux, ~/.local/share/net.lafine.pathscope/history.sqlite3
LLM settings~/.config/pathscope/settings.json (saved so that only you can read and write it)
Content saved by LLM assist~/.local/share/pathscope/facts.json
The “result to compare against” for recurring checks~/.local/share/pathscope/baseline.json

The history can be erased with “Delete all” on the history screen. Analysis results contain sensitive information about how this machine is configured (user names, file paths, permissions), so please limit where they are kept and shared. To use a command that is not in the LLM list, add it by hand to profiles in the settings file. It cannot be changed from the window.

Updating the app

PathScope on Mac is updated on its own, separately from RoamSwitch. It connects to lafine.net only when you press “Check for updates”, to get the latest version information (no information about this device or the analysis results is sent). If there is a new version, press “Install v○○”, and when it finishes, press “Restart to apply”. The downloaded update has its signature verified, and is swapped in only if it is confirmed not to have been tampered with.

PathScope on Linux is included in the RoamSwitch package, so it is updated when you update that package. The “Update” tab also says so.

The data used for analysis, such as known vulnerabilities, is bundled with the app. Anything found after that is not checked until you update PathScope. When the bundled data has become old, the analysis result says so.

8. What it does not do

9. Troubleshooting

SymptomWhat to do
On Mac, “Privacy settings data (TCC.db)” appears among the areas that could not be checkedIn the “Permissions” tab of “Settings”, click “Open the Full Disk Access settings”, turn PathScope on in System Settings, then restart PathScope and analyze again. The other analyses work even if you do not allow it.
“The LLM cannot be used” appears, or the settings cannot be savedEnable it under “LLM integration” in “Settings” and choose the LLM to use. If the list says “Not found”, install the command. When you choose opencode, codex or agy, the confirmation checkbox is also required.
An LLM stops with “Timed out”In the list under “LLM integration” in “Settings”, make that LLM’s “Timeout (seconds)” longer (from 1 to 900), then save.
“If I fix this?” cannot be usedIt cannot be used on a result opened from the history. Click “Analyze” again, then use it.
In-app updating cannot be usedIf you installed it from a RoamSwitch package on Linux, update it by updating the package. If you did not install it from a package (.deb, .rpm or AppImage), in-app updating cannot be used, so please reinstall from the distributed package.
← PathScope product page User Manual for Linux →