@@ -10,7 +10,7 @@ import (
1010 "os"
1111
1212 "github.com/slsa-framework/slsa-source-poc/sourcetool/pkg/attest"
13- "github.com/slsa-framework/slsa-source-poc/sourcetool/pkg/gh_control "
13+ "github.com/slsa-framework/slsa-source-poc/sourcetool/pkg/ghcontrol "
1414 "github.com/slsa-framework/slsa-source-poc/sourcetool/pkg/policy"
1515 "google.golang.org/protobuf/encoding/protojson"
1616
@@ -46,36 +46,36 @@ var (
4646)
4747
4848func doCheckLevelProv (checkLevelProvArgs CheckLevelProvArgs ) {
49- gh_connection :=
50- gh_control .NewGhConnection (checkLevelProvArgs .owner , checkLevelProvArgs .repo , gh_control .BranchToFullRef (checkLevelProvArgs .branch )).WithAuthToken (githubToken )
51- gh_connection .Options .AllowMergeCommits = checkLevelProvArgs .allowMergeCommits
49+ ghconnection :=
50+ ghcontrol .NewGhConnection (checkLevelProvArgs .owner , checkLevelProvArgs .repo , ghcontrol .BranchToFullRef (checkLevelProvArgs .branch )).WithAuthToken (githubToken )
51+ ghconnection .Options .AllowMergeCommits = checkLevelProvArgs .allowMergeCommits
5252 ctx := context .Background ()
5353
5454 prevCommit := checkLevelProvArgs .prevCommit
5555 var err error
5656 if prevCommit == "" {
57- prevCommit , err = gh_connection .GetPriorCommit (ctx , checkLevelProvArgs .commit )
57+ prevCommit , err = ghconnection .GetPriorCommit (ctx , checkLevelProvArgs .commit )
5858 if err != nil {
5959 log .Fatal (err )
6060 }
6161 }
6262
63- pa := attest .NewProvenanceAttestor (gh_connection , getVerifier ())
64- prov , err := pa .CreateSourceProvenance (ctx , checkLevelProvArgs .prevBundlePath , checkLevelProvArgs .commit , prevCommit , gh_connection .GetFullRef ())
63+ pa := attest .NewProvenanceAttestor (ghconnection , getVerifier ())
64+ prov , err := pa .CreateSourceProvenance (ctx , checkLevelProvArgs .prevBundlePath , checkLevelProvArgs .commit , prevCommit , ghconnection .GetFullRef ())
6565 if err != nil {
6666 log .Fatal (err )
6767 }
6868
6969 // check p against policy
7070 pe := policy .NewPolicyEvaluator ()
7171 pe .UseLocalPolicy = checkLevelProvArgs .useLocalPolicy
72- verifiedLevels , policyPath , err := pe .EvaluateSourceProv (ctx , gh_connection , prov )
72+ verifiedLevels , policyPath , err := pe .EvaluateSourceProv (ctx , ghconnection , prov )
7373 if err != nil {
7474 log .Fatal (err )
7575 }
7676
7777 // create vsa
78- unsignedVsa , err := attest .CreateUnsignedSourceVsa (gh_connection .GetRepoUri (), gh_connection .GetFullRef (), checkLevelProvArgs .commit , verifiedLevels , policyPath )
78+ unsignedVsa , err := attest .CreateUnsignedSourceVsa (ghconnection .GetRepoUri (), ghconnection .GetFullRef (), checkLevelProvArgs .commit , verifiedLevels , policyPath )
7979 if err != nil {
8080 log .Fatal (err )
8181 }
0 commit comments