Skip to content

Commit

Permalink
chore(docs): Update docs (#42)
Browse files Browse the repository at this point in the history
* chore(docs): Update docs

* add readme

* remove id gen from trivy-iac
  • Loading branch information
simar7 authored Nov 4, 2023
1 parent b08cb85 commit 6d440af
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 58 deletions.
19 changes: 19 additions & 0 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Architecture

This document aims to answer the question *Where is the code that does X?*

## Project Layout

The directory structure is broken down as follows:

- `avd_docs/` - The source for the [AVD documentation](https://aquasecurity.github.io/avd/).
- `cmd/` - These CLI tools are primarily used during development for end-to-end testing without needing to pull the library into trivy/tfsec etc.
- `internal/adapters` - Adapters take input - such as a Terraform file or an AWS account - and _adapt_ it to a common format that can be used by the rules engine.
- `pkg/detection` - Used for sniffing file types from both file name and content. This is done so that we can determine the type of file we're dealing with and then pass it to the correct parser.
- `pkg/extrafs` - Wraps `os.DirFS` to provide a filesystem that can also resolve symlinks.
- `pkg/formatters` - Used to format scan results in specific formats, such as JSON, CheckStyle, CSV, SARIF, etc.
- `pkg/rego` - A package for evaluating Rego rules against given inputs.
- `pkg/rules` - This package exposes internal rules, and imports them accordingly (see _rules.go_).
- `pkg/scanners` - Scanners for various inputs. For example, the `terraform` scanner will scan a Terraform directory and return a list of resources.
- `pkg/types` - Useful types. Our types wrap a simple data type (e.g. `bool`) and add various metadata to it, such as file name and line number where it was defined.
- `test` - Integration tests and other high-level tests that require a full build of the project.
5 changes: 0 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,3 @@ docs:
.PHONY: docs-test
docs-test:
go test -v ./cmd/avd_generator/...

.PHONY: id
id:
@go run ./cmd/id

10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# Trivy IAC
# trivy-iac

_trivy-iac_ is the Infrastructure-as-code scanning logic for Trivy

Please see [ARCHITECTURE.md](ARCHITECTURE.md) for more information.

_trivy-aws_ is an [Aqua Security](https://aquasec.com) open source project.
Learn about our open source work and portfolio [here](https://www.aquasec.com/products/open-source-projects/).
Join the community, and talk to us about any matter in [GitHub Discussion](https://github.com/aquasecurity/trivy/discussions).
52 changes: 0 additions & 52 deletions cmd/id/main.go

This file was deleted.

0 comments on commit 6d440af

Please sign in to comment.