Serverless Function Without Tags

  • Query id: f99d3482-fa8c-4f79-bad9-35212dded164
  • Query name: Serverless Function Without Tags
  • Platform: ServerlessFW
  • Severity: Low
  • Category: Insecure Configurations
  • CWE: 800
  • URL: Github

Description

Serverless Function should have associated tags
Documentation

Code samples

Code samples with security vulnerabilities

Positive test num. 1 - yml file
service: service
frameworkVersion: '2' 
provider:
  name: aws
  runtime: nodejs12.x

functions:
  hello:
    handler: handler.hello
    onError: arn:aws:sns:us-east-1:XXXXXX:test

Code samples without security vulnerabilities

Negative test num. 1 - yml file
service: service
frameworkVersion: '2' 
provider:
  name: aws
  runtime: nodejs12.x

functions:
  hello:
    handler: handler.hello
    onError: arn:aws:sns:us-east-1:XXXXXX:test
    tags:
      foo: bar
Negative test num. 2 - yml file
service: service
frameworkVersion: '2' 
provider:
  name: aws
  runtime: nodejs12.x
  stackTags:
    foo: bar

functions:
  hello:
    handler: handler.hello
    onError: arn:aws:sns:us-east-1:XXXXXX:test