diff --git a/components/consumers/jira/task.yaml b/components/consumers/jira/task.yaml index c11402357..45acd7b6d 100644 --- a/components/consumers/jira/task.yaml +++ b/components/consumers/jira/task.yaml @@ -6,7 +6,12 @@ metadata: labels: v1.smithy.smithy-security.com/component: consumer spec: - description: Pushes findings to a Jira instance. + description: | + Pushes findings to a Jira instance. + The Project Name parameter needs to match the project name on Jira + The Issue Type parameter needs to match the exact issue type of the project on Jira. + Jira does not support multiple issue types per board. + Keep in mind that you need to provide both the api token and the email of the user who owns the api token for this component to authenticate. volumes: - name: scratch emptyDir: {} @@ -20,6 +25,10 @@ spec: - name: consumer-jira-project-name type: string default: "" + - name: consumer-jira-issue-type + type: string + default: "Task" + workspaces: - name: output description: The workspace containing the source-code to scan. @@ -33,7 +42,7 @@ spec: { "defaultValues": { "project": "$(params.consumer-jira-project-name)", - "issueType": "Task", + "issueType": "$(params.consumer-jira-issue-type)", "customFields": null }, "descriptionTemplate": "", diff --git a/go.mod b/go.mod index 3de12f9b7..cb98d6075 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( cloud.google.com/go/bigquery v1.57.1 github.com/CycloneDX/cyclonedx-go v0.9.0 github.com/DependencyTrack/client-go v0.13.0 - github.com/andygrunwald/go-jira v1.15.1 + github.com/andygrunwald/go-jira v1.16.0 github.com/avast/retry-go/v4 v4.3.3 github.com/aws/aws-sdk-go v1.17.7 github.com/elastic/go-elasticsearch/v8 v8.3.0 diff --git a/go.sum b/go.sum index e2791a016..3e5ba5536 100644 --- a/go.sum +++ b/go.sum @@ -131,8 +131,8 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5 github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -github.com/andygrunwald/go-jira v1.15.1 h1:6J9aYKb9sW8bxv3pBLYBrs0wdsFrmGI5IeTgWSKWKc8= -github.com/andygrunwald/go-jira v1.15.1/go.mod h1:GIYN1sHOIsENWUZ7B4pDeT/nxEtrZpE8l0987O67ZR8= +github.com/andygrunwald/go-jira v1.16.0 h1:PU7C7Fkk5L96JvPc6vDVIrd99vdPnYudHu4ju2c2ikQ= +github.com/andygrunwald/go-jira v1.16.0/go.mod h1:UQH4IBVxIYWbgagc0LF/k9FRs9xjIiQ8hIcC6HfLwFU= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= @@ -533,7 +533,7 @@ github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-migrate/migrate/v4 v4.15.1 h1:Sakl3Nm6+wQKq0Q62tpFMi5a503bgGhceo2icrgQ9vM= @@ -607,7 +607,7 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -1529,6 +1529,7 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210818153620-00dd8d7831e7/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220330033206-e17cdc41300f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/vendor/github.com/andygrunwald/go-jira/Makefile b/vendor/github.com/andygrunwald/go-jira/Makefile index 928c554c8..e9b063d7a 100644 --- a/vendor/github.com/andygrunwald/go-jira/Makefile +++ b/vendor/github.com/andygrunwald/go-jira/Makefile @@ -18,7 +18,7 @@ fmt: ## Runs go fmt (to check for go coding guidelines). .PHONY: staticcheck staticcheck: ## Runs static analysis to prevend bugs, foster code simplicity, performance and editor integration. - go get -u honnef.co/go/tools/cmd/staticcheck + go install honnef.co/go/tools/cmd/staticcheck@2022.1 staticcheck ./... .PHONY: all diff --git a/vendor/modules.txt b/vendor/modules.txt index 1fe173d5e..4f511d93e 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -47,7 +47,7 @@ github.com/Masterminds/semver/v3 # github.com/andybalholm/brotli v1.0.4 ## explicit; go 1.12 github.com/andybalholm/brotli -# github.com/andygrunwald/go-jira v1.15.1 +# github.com/andygrunwald/go-jira v1.16.0 ## explicit; go 1.15 github.com/andygrunwald/go-jira # github.com/antlr4-go/antlr/v4 v4.13.0