import six


def get_secret_parameters(parameters):
    """
    Filter the provided parameters dict and return a list of parameter names which are marked as
    secret.

    :param parameters: Dictionary with runner or action parameters schema specification.
    :type parameters: ``dict``

    :rtype ``list``
    """
    secret_parameters = [parameter for parameter, options in
                         six.iteritems(parameters) if options.get('secret', False)]

    return secret_parameters