rspec/rules/S6333/python/rule.adoc

57 lines
1.0 KiB
Plaintext
Raw Normal View History

include::../description.adoc[]
include::../ask-yourself.adoc[]
include::../recommended.adoc[]
== Sensitive Code Example
For https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.CfnRoute.html[aws_cdk.aws_apigatewayv2.CfnRoute]:
[source,python]
----
from aws_cdk import (
aws_apigatewayv2 as apigateway
)
apigateway.CfnRoute(
self,
"no-auth",
api_id=api.ref,
route_key="GET /test",
authorization_type="NONE" # Sensitive
)
----
== Compliant Solution
For https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.CfnRoute.html[aws_cdk.aws_apigatewayv2.CfnRoute]:
[source,python]
----
from aws_cdk import (
aws_apigatewayv2 as apigateway
)
apigateway.CfnRoute(
self,
"auth",
api_id=api.ref,
route_key="GET /test",
authorization_type="AWS_IAM"
)
----
include::../see.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
endif::env-github,rspecator-view[]