Language: JavaScript
Label: vulnerable
CWE: CWE-614 \u2014 Sensitive Cookie in HTTPS Session Without 'Secure' Attribute
The Secure attribute for sensitive cookies in HTTPS sessions is not set, which could cause the user agent to send those cookies in plaintext over an HTTP session.

Code:
        $scope.setXdebugCookie = function(){
            $.cookie('XDEBUG_TRIGGER', 'true');
            $scope.hasXdebugCookie = true;
        };