Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
f3386ba
Update dependabot.yaml and dependencies
santoshkal Oct 1, 2024
f36fac6
Upgrade: Bump aquasecurity/trivy-action from 0.24.0 to 0.28.0 (#192)
dependabot[bot] Oct 24, 2024
7189030
Upgrade: Bump sigstore/cosign-installer from 3.6.0 to 3.7.0 (#189)
dependabot[bot] Oct 24, 2024
34daa92
Upgrade: Bump actions/setup-go from 5.0.2 to 5.1.0 (#191)
dependabot[bot] Oct 24, 2024
d617699
Add validation with Regex patterns (#168)
santoshkal Oct 29, 2024
4b16945
Upgrade: Bump github/codeql-action from 3.26.7 to 3.27.0 (#190)
dependabot[bot] Oct 29, 2024
da847a6
Upgrade: Bump actions/checkout from 4.1.7 to 4.2.2 (#193)
dependabot[bot] Oct 29, 2024
20fb774
Upgrade: Bump sigs.k8s.io/release-utils from 0.8.4 to 0.8.5 (#194)
dependabot[bot] Oct 29, 2024
22a491d
Upgrade: Bump golang.org/x/net from 0.28.0 to 0.30.0 (#195)
dependabot[bot] Oct 29, 2024
3649fc8
Upgrade: Bump github.com/jedib0t/go-pretty/v6 from 6.5.9 to 6.6.1 (#197)
dependabot[bot] Oct 29, 2024
3bfd572
Upgrade: Bump golangci/golangci-lint-action from 6.1.0 to 6.1.1 (#199)
dependabot[bot] Oct 29, 2024
c07ed02
Upgrade: Bump anchore/sbom-action from 0.17.2 to 0.17.5 (#200)
dependabot[bot] Oct 29, 2024
d60aa58
Upgrade: Bump github.com/fatih/color from 1.17.0 to 1.18.0 (#207)
dependabot[bot] Nov 7, 2024
277451b
Upgrade: Bump github.com/open-policy-agent/opa from 0.67.1 to 0.70.0 …
dependabot[bot] Nov 7, 2024
8950de0
Fix golang-ci-lint version from 1.59 to 1.60 (#214)
santoshkal Nov 12, 2024
57645ce
Fix lint errors in pre-main (#217)
santoshkal Nov 12, 2024
886c542
Add genai command for interacting with LLMs for generating IaC files …
santoshkal Nov 13, 2024
8643fb2
Upgrade: Bump github.com/hashicorp/hcl/v2 from 2.21.0 to 2.23.0 (#224)
dependabot[bot] Nov 19, 2024
8c9aba6
Upgrade: Bump github/codeql-action from 3.27.0 to 3.27.4 (#223)
dependabot[bot] Nov 19, 2024
1a95274
Upgrade: Bump golang.org/x/oauth2 from 0.22.0 to 0.24.0 (#212)
dependabot[bot] Nov 19, 2024
6b9c9d8
Upgrade: Bump anchore/sbom-action from 0.17.5 to 0.17.7 (#210)
dependabot[bot] Nov 19, 2024
a27aeda
Upgrade: Bump goreleaser/goreleaser-action from 6.0.0 to 6.1.0 (#209)
dependabot[bot] Nov 19, 2024
9917bba
Upgrade: Bump github.com/sigstore/cosign/v2 from 2.4.0 to 2.4.1 (#205)
dependabot[bot] Nov 19, 2024
890b40d
Upgrade: Bump cuelang.org/go from 0.10.0 to 0.10.1 (#203)
dependabot[bot] Nov 19, 2024
8286bba
Update printresults.go (#246)
santoshkal Dec 19, 2024
75dde5d
WIP: on integrating Ai with validation workflow for remediation actions:
santoshkal Dec 20, 2024
5c1ac79
WIP: All required parameters for GenerateChatResponse extracted.
santoshkal Dec 23, 2024
3808123
WIP: First working code for remediating Dockerfiles for errors thrown…
santoshkal Dec 23, 2024
4dbfea8
WIP: First working code for remediating Dockerfiles for errors thrown…
santoshkal Dec 24, 2024
470baa4
WIP: First cut with reading config file with viper
santoshkal Dec 26, 2024
baa4ade
WIP: Updated to pass only the failed results and updated Dockerfile
santoshkal Dec 27, 2024
eb6b12c
WIP: Now every iteration get updated Dockerfile with resultsFailed --…
santoshkal Dec 27, 2024
b64c540
WIP: Only Failed results are passed to LLM
santoshkal Dec 27, 2024
d8631dc
WIP: passing args by flags bug fixed. Add LLM integration for infrafi…
santoshkal Jan 2, 2025
7ca9898
Refactor to move all the LLM logic to LLM package.
santoshkal Jan 9, 2025
00c7e98
WIP: Validation remediated implemented in all regoval commands.
santoshkal Jan 9, 2025
34f56c0
remediation changes
santoshkal Jan 9, 2025
a11026a
WIP: remediation implemented on CEL dockerfileval cmd.
santoshkal Jan 10, 2025
26ca29b
Add printing errors and verbose success logs for successful validatio…
santoshkal Jan 21, 2025
609e0dc
Fix CI Lint errors
santoshkal Jan 24, 2025
0ad31e0
Fix CI Lint errors
santoshkal Jan 24, 2025
3ffc0a1
Add example for cue init in cue command
santoshkal Jan 24, 2025
da83e0b
Merge pull request #252 from intelops/validate-with-ai
devopstoday11 Jan 24, 2025
73f62ab
Upgrade: Bump anchore/sbom-action from 0.17.7 to 0.18.0 (#260)
dependabot[bot] Jan 27, 2025
b4cd496
Upgrade: Bump github/codeql-action from 3.27.4 to 3.28.5 (#259)
dependabot[bot] Jan 27, 2025
af74eef
Upgrade: Bump actions/setup-go from 5.1.0 to 5.3.0 (#258)
dependabot[bot] Jan 27, 2025
c804cb2
Upgrade: Bump github.com/google/cel-go from 0.21.0 to 0.23.0 (#257)
dependabot[bot] Jan 27, 2025
9ed050a
Upgrade: Bump cuelang.org/go from 0.11.1 to 0.11.2 (#256)
dependabot[bot] Jan 27, 2025
2b634b5
Upgrade: Bump github.com/zclconf/go-cty from 1.15.0 to 1.16.2 (#254)
dependabot[bot] Jan 27, 2025
922436a
Upgrade: Bump github.com/briandowns/spinner from 1.23.1 to 1.23.2 (#255)
dependabot[bot] Jan 27, 2025
5e67f1a
Migrate from sasahasarabonov/openai-go to tml/langchaingo (#262)
santoshkal Mar 25, 2025
47230ab
Update go.mod dependencies
santoshkal Mar 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ linters:
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- unused
- misspell
Expand All @@ -27,4 +26,4 @@ issues:
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
max-issues-per-linter: 0
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
max-same-issues: 0
max-same-issues: 0
4 changes: 3 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
target-branch: "pre-main"
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "pre-main"
schedule:
interval: "weekly"
27 changes: 17 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,43 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5
with:
go-version: "1.22"
go-version: "1.23"
cache: false
- name: Run tests
run: go test ./... -coverprofile=coverage.out -coverpkg=./... -covermode=atomic
run: |
go mod tidy
go test ./... -coverprofile=coverage.out -coverpkg=./... -covermode=atomic
- name: golangci-lint
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6
with:
version: v1.59
version: v1.60
args: -v --config=.ci.yml
skip-pkg-cache: true
skip-build-cache: true

- name: Static check
uses: dominikh/staticcheck-action@fe1dd0c3658873b46f8c9bb3291096a617310ca6 # v1.3.1
with:
version: "2023.1.6"
version: "2024.1.1"
install-go: false
cache-key: "1.22"
cache-key: "1.23"
- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 # 0.24.0
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2 # 0.28.0
with:
scan-type: "fs"
ignore-unfixed: true
format: sarif
output: "trivy-results.sarif"
severity: "CRITICAL,HIGH"
env:
# Use AWS' ECR mirror for the trivy-db image, as GitHub's Container
# Registry is returning a TOOMANYREQUESTS error.
# Ref: https://github.com/aquasecurity/trivy-action/issues/389
TRIVY_DB_REPOSITORY: "public.ecr.aws/aquasecurity/trivy-db:2"
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@8214744c546c1e5c8f03dde8fab3a7353211988d # v3
uses: github/codeql-action/upload-sarif@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3
with:
sarif_file: "trivy-results.sarif"
10 changes: 5 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0 # this is important, otherwise it won't checkout the full tree (i.e. no previous tags)
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5
with:
go-version: 1.22 # Go version
cache: true
- name: Run tests
run: go test ./... -coverprofile=coverage.out -coverpkg=./... -covermode=atomic

- uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3.5 # installs cosign
- uses: anchore/sbom-action/download-syft@61119d458adab75f756bc0b9e4bde25725f86a7a # v0.17 installs syft
- uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6 # run goreleaser
- uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.5 # installs cosign
- uses: anchore/sbom-action/download-syft@f325610c9f50a54015d37c8d16cb3b0e2c8f4de0 # v0.17 installs syft
- uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf # v6 # run goreleaser
id: goreleaser
with:
version: latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ todo.md
results.json
.env
!pkg/validate/testdata/Dockerfile/
demo/
8 changes: 4 additions & 4 deletions cmd/artifact_pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"path/filepath"

"github.com/fatih/color"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/intelops/genval/pkg/oci"
"github.com/intelops/genval/pkg/utils"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)

var pullCmd = &cobra.Command{
Expand Down Expand Up @@ -106,8 +106,8 @@ func runPullArtifactCmd(cmd *cobra.Command, args []string) error {
defer spin.Stop()

if err := oci.PullArtifact(context.Background(), pullArgs.creds, pullArgs.dest, pullArgs.path); err != nil {
fe := color.RedString("Error pulling artifact from remote: %v", err)
return fmt.Errorf(fe)
errorMessage := color.RedString("Error pulling artifact from remote: %v", err)
return fmt.Errorf("%s", errorMessage)
}
spin.Stop()
color.Green("Artifact from %s pulled and stored in :%s", pullArgs.dest, pullArgs.path)
Expand Down
16 changes: 11 additions & 5 deletions cmd/artifact_push.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ import (
"github.com/google/go-containerregistry/pkg/v1/remote/transport"
"github.com/google/go-containerregistry/pkg/v1/tarball"
"github.com/google/go-containerregistry/pkg/v1/types"
"github.com/intelops/genval/pkg/oci"
"github.com/intelops/genval/pkg/utils"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/intelops/genval/pkg/oci"
"github.com/intelops/genval/pkg/utils"
)

var pushCmd = &cobra.Command{
Expand Down Expand Up @@ -200,8 +201,13 @@ func runPushCmd(cmd *cobra.Command, args []string) error {
}
}

log.Infof(color.GreenString("✔ Artifact pushed successfully to: %v", pushArgs.dest))
log.Infof(color.GreenString("✔ Digest: %v", digest))
log.Infof(color.GreenString("✔ Digest URL: %v\n", digestURL))
// Create formatted messages # Fix govet warnings
artifactMessage := color.GreenString("✔ Artifact pushed successfully to: %v", pushArgs.dest)
digestMessage := color.GreenString("✔ Digest: %v", digest)
digestURLMessage := color.GreenString("✔ Digest URL: %v\n", digestURL)

log.Info(artifactMessage)
log.Info(digestMessage)
log.Info(digestURLMessage)
return nil
}
99 changes: 0 additions & 99 deletions cmd/cel_infrafile.go

This file was deleted.

Loading
Loading