-
Notifications
You must be signed in to change notification settings - Fork 1
🛡️ Sentinel: Fix SSRF via DNS resolution & link-local checks #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,86 @@ | ||||
| import unittest | ||||
Check warningCode scanning / Pylint (reported by Codacy) Missing module docstring Warning test
Missing module docstring
Check warningCode scanning / Pylintpython3 (reported by Codacy) Missing module docstring Warning test
Missing module docstring
|
||||
| from unittest.mock import patch | ||||
| import socket | ||||
| import ipaddress | ||||
Check warningCode scanning / Prospector (reported by Codacy) Unused import ipaddress (unused-import) Warning test
Unused import ipaddress (unused-import)
Check noticeCode scanning / Pylint (reported by Codacy) Unused import ipaddress Note test
Unused import ipaddress
Check noticeCode scanning / Pylintpython3 (reported by Codacy) Unused import ipaddress Note test
Unused import ipaddress
|
||||
| import ipaddress |
Check warning
Code scanning / Pylint (reported by Codacy)
Missing class docstring Warning test
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Missing class docstring Warning test
Copilot
AI
Jan 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mock decorator is patching 'socket.getaddrinfo' globally, but it should patch 'main.socket.getaddrinfo' instead. Since main.py imports socket and calls socket.getaddrinfo, the patch needs to target where it's used (in the main module) rather than the socket module itself. This applies to all test methods that use @patch('socket.getaddrinfo').
Check warning
Code scanning / Pylint (reported by Codacy)
Missing method docstring Warning test
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Missing function or method docstring Warning test
Copilot
AI
Jan 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mock decorator is patching 'socket.getaddrinfo' globally, but it should patch 'main.socket.getaddrinfo' instead. Since main.py imports socket and calls socket.getaddrinfo, the patch needs to target where it's used (in the main module) rather than the socket module itself.
Check warning
Code scanning / Pylint (reported by Codacy)
Missing method docstring Warning test
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Missing function or method docstring Warning test
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Missing function or method docstring Warning test
Check warning
Code scanning / Pylint (reported by Codacy)
Missing method docstring Warning test
Copilot
AI
Jan 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mock decorator is patching 'socket.getaddrinfo' globally, but it should patch 'main.socket.getaddrinfo' instead. Since main.py imports socket and calls socket.getaddrinfo, the patch needs to target where it's used (in the main module) rather than the socket module itself.
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Missing function or method docstring Warning test
Check warning
Code scanning / Pylint (reported by Codacy)
Missing method docstring Warning test
Copilot
AI
Jan 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mock decorator is patching 'socket.getaddrinfo' globally, but it should patch 'main.socket.getaddrinfo' instead. Since main.py imports socket and calls socket.getaddrinfo, the patch needs to target where it's used (in the main module) rather than the socket module itself.
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Missing function or method docstring Warning test
Check warning
Code scanning / Pylint (reported by Codacy)
Missing method docstring Warning test
Copilot
AI
Jan 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mock decorator is patching 'socket.getaddrinfo' globally, but it should patch 'main.socket.getaddrinfo' instead. Since main.py imports socket and calls socket.getaddrinfo, the patch needs to target where it's used (in the main module) rather than the socket module itself.
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Missing function or method docstring Warning test
Check warning
Code scanning / Pylint (reported by Codacy)
Missing method docstring Warning test
Check warning
Code scanning / Prospector (reported by Codacy)
expected 2 blank lines after class or function definition, found 1 (E305) Warning test
Check warning
Code scanning / Prospector (reported by Codacy)
Use lazy % formatting in logging functions (logging-fstring-interpolation) Warning