This repository has been archived by the owner on Jun 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use defsec formatters and results structs * Update to defsec v0.0.31 * here you go * Add invalid content error (#24) * Add more defence against failure * Add the docs * Update the docs * fix commented out meta override Co-authored-by: Liam Galvin <[email protected]>
- Loading branch information
Showing
389 changed files
with
27,577 additions
and
690 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Deploy the latest documentation | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: Version to be deployed | ||
required: true | ||
push: | ||
tags: | ||
- "v*" | ||
jobs: | ||
deploy: | ||
name: Deploy the latest documentation | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Checkout main | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: true | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.x | ||
- name: Install dependencies | ||
run: | | ||
pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git | ||
pip install mike | ||
pip install mkdocs-macros-plugin | ||
pip install mkdocs-include-markdown-plugin | ||
env: | ||
GH_TOKEN: ${{ secrets.MKDOCS_AQUA_BOT }} | ||
- name: Configure the git user | ||
run: | | ||
git config user.name "owenrumney" | ||
git config user.email "[email protected]" | ||
- name: Deploy the latest documents from new tag push | ||
if: ${{ github.event.inputs.version == '' }} | ||
run: | | ||
VERSION=$(echo ${{ github.ref }} | sed -e "s#refs/tags/##g") | ||
mike deploy --push --update-aliases $VERSION latest | ||
- name: Deploy the latest documents from manual trigger | ||
if: ${{ github.event.inputs.version != '' }} | ||
run: mike deploy --push --update-aliases ${{ github.event.inputs.version }} latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM squidfunk/mkdocs-material:7.3.6 | ||
|
||
COPY requirements.txt /requirements.txt | ||
RUN pip install -r /requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
title: API Gateway stages for V1 and V2 should have access logging enabled | ||
shortcode: enable-access-logging | ||
summary: API Gateway stages for V1 and V2 should have access logging enabled | ||
permalink: /docs/api-gateway/enable-access-logging/ | ||
--- | ||
|
||
### Explanation | ||
|
||
API Gateway stages should have access log settings block configured to track all access to a particular stage. This should be applied to both v1 and v2 gateway stages. | ||
|
||
### Possible Impact | ||
Logging provides vital information about access and usage | ||
|
||
### Suggested Resolution | ||
Enable logging for API Gateway stages | ||
|
||
|
||
### Insecure Example | ||
|
||
The following example will fail the AVD-AWS-0001 check. | ||
|
||
```yaml | ||
--- | ||
AWSTemplateFormatVersion: 2010-09-09 | ||
Description: Bad Example of ApiGateway | ||
Resources: | ||
BadApi: | ||
Type: AWS::ApiGatewayV2::Api | ||
BadApiStage: | ||
Type: AWS::ApiGatewayV2::Stage | ||
Properties: | ||
AccessLogSettings: | ||
Format: json | ||
ApiId: !Ref BadApi | ||
StageName: BadApiStage | ||
|
||
``` | ||
|
||
|
||
|
||
### Secure Example | ||
|
||
The following example will pass the AVD-AWS-0001 check. | ||
|
||
```yaml | ||
--- | ||
AWSTemplateFormatVersion: 2010-09-09 | ||
Description: Good Example of ApiGateway | ||
Resources: | ||
GoodApi: | ||
Type: AWS::ApiGatewayV2::Api | ||
GoodApiStage: | ||
Type: AWS::ApiGatewayV2::Stage | ||
Properties: | ||
AccessLogSettings: | ||
DestinationArn: gateway-logging | ||
Format: json | ||
ApiId: !Ref GoodApi | ||
StageName: GoodApiStage | ||
|
||
``` | ||
|
||
|
||
|
||
|
||
### Related Links | ||
|
||
|
||
- [https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html](https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html) | ||
|
||
|
Oops, something went wrong.