2022-01-01 06:52:31 -08:00
|
|
|
# Copyright 2022 Google LLC
|
2021-09-08 03:49:52 -07:00
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# https://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
2022-01-01 06:52:31 -08:00
|
|
|
name: "Validate firewall rules"
|
|
|
|
description: "Validate firewall rule YAML files"
|
2021-09-08 03:49:52 -07:00
|
|
|
inputs:
|
|
|
|
files:
|
2022-01-01 06:52:31 -08:00
|
|
|
description: "Files to scan (supports wildcards)"
|
2021-09-08 03:49:52 -07:00
|
|
|
required: false
|
2022-01-01 06:52:31 -08:00
|
|
|
default: "/github/workspace/firewall/**/*.yaml"
|
2021-09-08 03:49:52 -07:00
|
|
|
mode:
|
2022-01-01 06:52:31 -08:00
|
|
|
description: "Mode (validate or approve)"
|
2021-09-08 03:49:52 -07:00
|
|
|
required: false
|
2022-01-01 06:52:31 -08:00
|
|
|
default: "validate"
|
2021-09-08 03:49:52 -07:00
|
|
|
schema:
|
2022-01-01 06:52:31 -08:00
|
|
|
description: "Schema"
|
2021-09-08 03:49:52 -07:00
|
|
|
required: false
|
2022-01-01 06:52:31 -08:00
|
|
|
default: "/schemas/firewallSchema.yaml"
|
2021-09-08 03:49:52 -07:00
|
|
|
outputs:
|
|
|
|
ok:
|
2022-01-01 06:52:31 -08:00
|
|
|
description: "Validation successful"
|
2021-09-08 03:49:52 -07:00
|
|
|
errors:
|
2022-01-01 06:52:31 -08:00
|
|
|
description: "Validation results"
|
2021-09-08 03:49:52 -07:00
|
|
|
runs:
|
2022-01-01 06:52:31 -08:00
|
|
|
using: "docker"
|
|
|
|
image: "Dockerfile"
|
2021-09-08 03:49:52 -07:00
|
|
|
args:
|
|
|
|
- ${{ inputs.files }}
|
|
|
|
- "--mode"
|
|
|
|
- ${{ inputs.mode }}
|
|
|
|
- "--schema"
|
|
|
|
- ${{ inputs.schema }}
|
2022-01-01 06:52:31 -08:00
|
|
|
- "--github"
|