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-secure-unsafe-value patterns: - pattern-either: - patterns: - pattern-not: pyramid.authentication.AuthTktCookieHelper(..., **$PARAMS) - pattern: pyramid.authentication.AuthTktCookieHelper(..., secure=$SECURE, ...) - patterns: - pattern-not: pyramid.authentication.AuthTktAuthenticationPolicy(..., **$PARAMS) - pattern: pyramid.authentication.AuthTktAuthenticationPolicy(..., secure=$SECURE, ...) - pattern: $SECURE - metavariable-pattern: metavariable: $SECURE pattern: | False fix: | True message: >- Found a Pyramid Authentication Ticket cookie without the secure option correctly set. Pyramid cookies should be handled securely by setting secure=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-614: Sensitive Cookie in HTTPS Session Without 'Secure' Attribute" 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