diff --git a/docs/reference/README.md b/docs/reference/README.md index 4a97ba0e..94b6003e 100644 --- a/docs/reference/README.md +++ b/docs/reference/README.md @@ -36,3 +36,4 @@ - [os](./os.md) - OS operations - [random](./random.md) - Random generation utilities - [terraform](./terraform.md) - Terraform operations +- [trivy](./trivy.md) - - diff --git a/docs/reference/trivy.md b/docs/reference/trivy.md new file mode 100644 index 00000000..a4470b24 --- /dev/null +++ b/docs/reference/trivy.md @@ -0,0 +1,24 @@ +--- +sidebar_label: trivy +--- + +# alpha.dagger.io/trivy + +```cue +import "alpha.dagger.io/trivy" +``` + +## trivy.#Config + +Trivy configuration + +### trivy.#Config Inputs + +| Name | Type | Description | +| ------------- |:-------------: |:-------------: | +|*username* | `dagger.#Secret` |- | +|*password* | `dagger.#Secret` |- | + +### trivy.#Config Outputs + +_No output._ diff --git a/stdlib/.dagger/env/http/state/computed.json b/stdlib/.dagger/env/http/state/computed.json new file mode 100644 index 00000000..03ed92ec --- /dev/null +++ b/stdlib/.dagger/env/http/state/computed.json @@ -0,0 +1,9 @@ +{ + "TestRequest": { + "req": { + "response": { + "body": "{\n \"current_user_url\": \"https://api.github.com/user\",\n \"current_user_authorizations_html_url\": \"https://github.com/settings/connections/applications{/client_id}\",\n \"authorizations_url\": \"https://api.github.com/authorizations\",\n \"code_search_url\": \"https://api.github.com/search/code?q={query}{\u0026page,per_page,sort,order}\",\n \"commit_search_url\": \"https://api.github.com/search/commits?q={query}{\u0026page,per_page,sort,order}\",\n \"emails_url\": \"https://api.github.com/user/emails\",\n \"emojis_url\": \"https://api.github.com/emojis\",\n \"events_url\": \"https://api.github.com/events\",\n \"feeds_url\": \"https://api.github.com/feeds\",\n \"followers_url\": \"https://api.github.com/user/followers\",\n \"following_url\": \"https://api.github.com/user/following{/target}\",\n \"gists_url\": \"https://api.github.com/gists{/gist_id}\",\n \"hub_url\": \"https://api.github.com/hub\",\n \"issue_search_url\": \"https://api.github.com/search/issues?q={query}{\u0026page,per_page,sort,order}\",\n \"issues_url\": \"https://api.github.com/issues\",\n \"keys_url\": \"https://api.github.com/user/keys\",\n \"label_search_url\": \"https://api.github.com/search/labels?q={query}\u0026repository_id={repository_id}{\u0026page,per_page}\",\n \"notifications_url\": \"https://api.github.com/notifications\",\n \"organization_url\": \"https://api.github.com/orgs/{org}\",\n \"organization_repositories_url\": \"https://api.github.com/orgs/{org}/repos{?type,page,per_page,sort}\",\n \"organization_teams_url\": \"https://api.github.com/orgs/{org}/teams\",\n \"public_gists_url\": \"https://api.github.com/gists/public\",\n \"rate_limit_url\": \"https://api.github.com/rate_limit\",\n \"repository_url\": \"https://api.github.com/repos/{owner}/{repo}\",\n \"repository_search_url\": \"https://api.github.com/search/repositories?q={query}{\u0026page,per_page,sort,order}\",\n \"current_user_repositories_url\": \"https://api.github.com/user/repos{?type,page,per_page,sort}\",\n \"starred_url\": \"https://api.github.com/user/starred{/owner}{/repo}\",\n \"starred_gists_url\": \"https://api.github.com/gists/starred\",\n \"topic_search_url\": \"https://api.github.com/search/topics?q={query}{\u0026page,per_page}\",\n \"user_url\": \"https://api.github.com/users/{user}\",\n \"user_organizations_url\": \"https://api.github.com/user/orgs\",\n \"user_repositories_url\": \"https://api.github.com/users/{user}/repos{?type,page,per_page,sort}\",\n \"user_search_url\": \"https://api.github.com/search/users?q={query}{\u0026page,per_page,sort,order}\"\n}\n" + } + } + } +} diff --git a/stdlib/trivy/trivy.cue b/stdlib/trivy/trivy.cue new file mode 100644 index 00000000..abb04e50 --- /dev/null +++ b/stdlib/trivy/trivy.cue @@ -0,0 +1,24 @@ +package trivy + +import ( + "alpha.dagger.io/dagger" +) + +// Set Trivy download source +// - AWS +// - GCP +// - Docker Hub +// - Self Hosted + +// Trivy configuration +#Config: { + // Download source (AWS, GCP, Docker Hub, Self hosted) + source: string + + // Trivy Image arguments + args: [arg=string]: string + + username: dagger.#Input & {*null | dagger.#Secret} + password: dagger.#Input & {*null | dagger.#Secret} + ssl: *true | bool +}