Troubleshooting
This guide helps you identify and resolve common issues with Safety Firewall. If you encounter problems during installation, configuration, or daily usage, the solutions here should help you get back
Verifying Installation
Problem: Command Not Found
If you see safety: command not found
or similar errors:
Verify that Safety CLI is installed:
Ensure the installation directory is in your PATH:
Reinstall Safety CLI if needed:
Problem: "No such command" for Firewall Commands
If you see Error: No such command 'init'
or Error: No such command 'firewall'
:
Verify that you're authenticated:
If not authenticated, log in:
Verify that your account has the Firewall feature enabled in Safety Platform
Alias Configuration Issues
Problem: Package Manager Not Aliased
If which pip
doesn't show pip is aliased to safety pip
:
Reload your shell configuration:
If that doesn't work, check the alias in your profile file:
If the alias is missing, run the installation again:
Alias Not Working After System Restart
If aliases stop working after restarting your system:
Check which shell you're using:
Ensure Safety added aliases to the correct profile file for your shell
Add the source command to your shell's startup file if needed
Authentication Issues
Unable to Authenticate
If you're having trouble authenticating:
Ensure you have a valid Safety account
Check your internet connection
Try authenticating with the verbose flag:
If the browser doesn't open automatically, manually copy and paste the URL from the terminal
Authentication Unexpectedly Fails
If you suddenly lose authentication:
Check your authentication status:
Re-authenticate if needed:
Check if your organization's API key has been rotated (for organization admins)
Firewall Uninstallation Issues
Unable to Uninstall Firewall
If safety firewall uninstall
fails with "No such command":
First, ensure you're authenticated:
If still unable to uninstall, manually remove the aliases:
Check your shell profile files (~/.bashrc, ~/.zshrc, etc.) for Safety aliases
Remove the Safety-related lines
Delete the ~/.safety directory:
Package Installation Issues
Slow Package Installation
If package installations through Safety Firewall are slower than expected:
This is normal behaviour in the current version of Safety Firewall
Future versions will improve performance by streaming packages while analyzing them
Unexpected Blocking of Packages
If legitimate packages are being blocked:
Check your organization's policies in Safety Platform
Look for overly restrictive rules that might be causing false positives
Consider temporarily modifying the policy to use warnings instead of blocks
Codebase Issues
Codebase Not Appearing in Platform
If your codebase doesn't appear in Safety Platform after configuration:
Verify the codebase is properly initialized:
Ensure you've run a scan at least once:
Check that you're authenticated with the correct organization:
Automatic Scans Not Working
If automatic scans aren't running after package installations:
Verify that you're in a properly configured codebase directory
Check the
.safety-project.ini
file for any configuration issuesVerify package manager alias is working correctly (use
which pip
)Run a manual scan to check if scanning works at all:
Platform Connection Issues
CLI Can't Connect to Platform
If the CLI can't connect to Safety Platform:
Check your internet connection
Verify your authentication:
Check for proxy or firewall issues in your network
Try with the verbose flag to see more details:
Getting Additional Help
If you're still experiencing issues:
Run commands with the
--verbose
flag to get more detailed outputCheck the Safety logs (located in
~/.safety/logs/
)Command output (including any error messages)
Log contents
Your operating system and version
Your Safety CLI version (
safety --version
)
Last updated
Was this helpful?