UNPKG

mcp-server-semgrep

Version:

MCP Server for Semgrep Integration - static code analysis with AI

40 lines (39 loc) 1.32 kB
rules: - id: pyramid-authtkt-cookie-httponly-unsafe-value patterns: - pattern-either: - patterns: - pattern-not: pyramid.authentication.AuthTktCookieHelper(..., **$PARAMS) - pattern: pyramid.authentication.AuthTktCookieHelper(..., httponly=$HTTPONLY, ...) - patterns: - pattern-not: pyramid.authentication.AuthTktAuthenticationPolicy(..., **$PARAMS) - pattern: pyramid.authentication.AuthTktAuthenticationPolicy(..., httponly=$HTTPONLY, ...) - pattern: $HTTPONLY - metavariable-pattern: metavariable: $HTTPONLY pattern: | False fix: | True message: >- Found a Pyramid Authentication Ticket cookie without the httponly option correctly set. Pyramid cookies should be handled securely by setting httponly=True. If this parameter is not properly set, your cookies are not properly protected and are at risk of being stolen by an attacker. metadata: cwe: - "CWE-1004: Sensitive Cookie Without 'HttpOnly' Flag" owasp: - A05:2021 - Security Misconfiguration category: security technology: - pyramid references: - https://owasp.org/Top10/A05_2021-Security_Misconfiguration subcategory: - vuln likelihood: LOW impact: LOW confidence: MEDIUM languages: [python] severity: WARNING