Skip to content

Commit

Permalink
Move tfsec formatter to conform to architectural standards (#508)
Browse files Browse the repository at this point in the history
  • Loading branch information
wibisana-kargo authored Aug 5, 2021
1 parent f1b9160 commit 9dae597
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions internal/controllers/analyzer/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import (
"github.com/ZupIT/horusec/internal/services/formatters/generic/semgrep"
"github.com/ZupIT/horusec/internal/services/formatters/go/gosec"
"github.com/ZupIT/horusec/internal/services/formatters/go/nancy"
"github.com/ZupIT/horusec/internal/services/formatters/hcl"
"github.com/ZupIT/horusec/internal/services/formatters/hcl/tfsec"
"github.com/ZupIT/horusec/internal/services/formatters/java/horusecjava"
"github.com/ZupIT/horusec/internal/services/formatters/javascript/horusecnodejs"
"github.com/ZupIT/horusec/internal/services/formatters/javascript/npmaudit"
Expand Down Expand Up @@ -340,7 +340,7 @@ func (a *Analyzer) detectVulnerabilityHCL(_ *sync.WaitGroup, projectSubPath stri
if err := a.docker.PullImage(a.getCustomOrDefaultImage(languages.HCL)); err != nil {
return err
}
hcl.NewFormatter(a.formatter).StartAnalysis(projectSubPath)
tfsec.NewFormatter(a.formatter).StartAnalysis(projectSubPath)
return nil
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package hcl
package tfsec

const CMD = `
{{WORK_DIR}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package hcl
package tfsec

import (
"encoding/json"
Expand All @@ -30,7 +30,7 @@ import (
dockerEntities "github.com/ZupIT/horusec/internal/entities/docker"
"github.com/ZupIT/horusec/internal/helpers/messages"
"github.com/ZupIT/horusec/internal/services/formatters"
"github.com/ZupIT/horusec/internal/services/formatters/hcl/entities"
"github.com/ZupIT/horusec/internal/services/formatters/hcl/tfsec/entities"
)

type Formatter struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package hcl
package tfsec

import (
"errors"
Expand Down

0 comments on commit 9dae597

Please sign in to comment.