Skip to content
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

Dev #39

Merged
merged 29 commits into from
Sep 17, 2024
Merged

Dev #39

merged 29 commits into from
Sep 17, 2024

Conversation

romainkieffer
Copy link
Contributor

Generic requirements in order to contribute:

  • One Pull Request per fix/feature/change/...
  • Keep the amount of commits per PR as small as possible: if for any reason, you need to fix your commit after the pull request, please squash the changes in one single commit (or tell us why not)
  • Always make sure it is mergeable in the default branch
  • Any major changes adding a functionality should be disabled by default in the configuration

What does it do?

If it fixes an existing issue, please use GitHub syntax: #<IssueID>

Questions

  • Does it require a DB change?
  • Are you using it in production?

Release Type:

  • Major
  • Minor
  • Patch

pparage and others added 29 commits June 4, 2024 15:22
Signed-off-by: Romain Kieffer <[email protected]>
Signed-off-by: Romain Kieffer <[email protected]>
@romainkieffer romainkieffer merged commit 97d2a16 into main Sep 17, 2024
1 of 7 checks passed

const href = this.getAttribute('data-href');
if (href) {
window.location.href = href;

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML Medium

DOM text
is reinterpreted as HTML without escaping meta-characters.
results[f"{server}:{port}"] = "TLS not supported"
elif port == 465:
# For 465, it should be SSL/TLS from the start
with context.wrap_socket(sock, server_hostname=server) as ssock:

Check failure

Code scanning / CodeQL

Use of insecure SSL/TLS version High test

Insecure SSL/TLS protocol version TLSv1 allowed by
call to ssl.create_default_context
.
Insecure SSL/TLS protocol version TLSv1_1 allowed by
call to ssl.create_default_context
.
dict: A dictionary with detailed CSP analysis results.
"""
try:
response = requests.get(f"https://{domain}", timeout=10)

Check failure

Code scanning / CodeQL

Full server-side request forgery Critical test

The full URL of this request depends on a
user-provided value
.


def check_csp_syntax(csp, result, header_name):
if not re.match(r'^[a-zA-Z0-9\-]+\s+[^;]+(?:;\s*[a-zA-Z0-9\-]+\s+[^;]+)*$', csp):

Check failure

Code scanning / CodeQL

Inefficient regular expression High test

This part of the regular expression may cause exponential backtracking on strings starting with '- :;-' and containing many repetitions of ' :;-'.


def check_csp_syntax(csp, result, header_name):
if not re.match(r'^[a-zA-Z0-9\-]+\s+[^;]+(?:;\s*[a-zA-Z0-9\-]+\s+[^;]+)*$', csp):

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data High test

This
regular expression
that depends on a
user-provided value
may run slow on strings starting with '- ' and with many repetitions of ' '.
This
regular expression
that depends on a
user-provided value
may run slow on strings starting with '- :;-' and with many repetitions of ' :;- '.
This
regular expression
that depends on a
user-provided value
may run slow on strings starting with '- :;- ' and with many repetitions of ' '.
bool: True if the integrity is valid, False otherwise.
"""
try:
response = requests.get(src, timeout=10)

Check failure

Code scanning / CodeQL

Full server-side request forgery Critical test

The full URL of this request depends on a
user-provided value
.
- 'message' (str): Additional information or error message.
"""
try:
response = requests.get(f"https://{domain}", timeout=10)

Check failure

Code scanning / CodeQL

Full server-side request forgery Critical test

The full URL of this request depends on a
user-provided value
.
"""
url = f'https://{domain}'
try:
response = requests.get(url, timeout=10)

Check failure

Code scanning / CodeQL

Full server-side request forgery Critical test

The full URL of this request depends on a
user-provided value
.
url = f'https://{domain}/.well-known/security.txt'
try:
# First, check if the file exists using HEAD request
head_response = requests.head(url, timeout=10)

Check failure

Code scanning / CodeQL

Full server-side request forgery Critical test

The full URL of this request depends on a
user-provided value
.
if head_response.status_code == 200:
# If it exists, attempt to get the content
try:
response = requests.get(url, timeout=10)

Check failure

Code scanning / CodeQL

Full server-side request forgery Critical test

The full URL of this request depends on a
user-provided value
.
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