Skip to content

Commit

Permalink
bump godel
Browse files Browse the repository at this point in the history
  • Loading branch information
arminaaki committed Oct 25, 2023
1 parent c09ebc1 commit c316181
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 21 deletions.
4 changes: 2 additions & 2 deletions godel/config/godel.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
distributionURL=https://github.com/palantir/godel/releases/download/v2.59.0/godel-2.59.0.tgz
distributionSHA256=0fece1223031956902f579f4749c5b38e3057bcfb74fe5751469249399412ae4
distributionURL=https://github.com/palantir/godel/releases/download/v2.92.0/godel-2.92.0.tgz
distributionSHA256=9645ee3f5d72b3d7e5035b5b1310251301c8b014b52de52767d90e172f861afd
10 changes: 5 additions & 5 deletions godelw
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
set -euo pipefail

# Version and checksums for godel. Values are populated by the godel "dist" task.
VERSION=2.59.0
DARWIN_AMD64_CHECKSUM=820eadb9dfa06c85fbc9c8cfc3bf66808c6d8788f802c05b85117194646530d4
DARWIN_ARM64_CHECKSUM=d0c6b63867d174623d8fec64102bc5d8bf3930ea74560fa3d5068dc031e45655
LINUX_AMD64_CHECKSUM=b383cac25cd7995a63c05a320333105447f035372772ec076184e0382238c898
LINUX_ARM64_CHECKSUM=d0b353a9a6ead13d09feb47a3556492c74b3066bdadb7f8e3389d2804ef238ad
VERSION=2.92.0
DARWIN_AMD64_CHECKSUM=a7be3d19cd1cbf3d844c1556c74a3972010f053f130124796a1d4499bc1e146a
DARWIN_ARM64_CHECKSUM=f377ed36e6f7bc779e4bac78d9fd53d4779a9601eced2afc2f645dfb8b27b9eb
LINUX_AMD64_CHECKSUM=1d9c8f12f407052c920192cd6e0dd3ae6a3d0400c82265d7549ead961fb634d9
LINUX_ARM64_CHECKSUM=483f860b7cc11b803c8b2b3dbc54aaf2b6b6481adf6fa3a89243e55a76194f41

# Downloads file at URL to destination path using wget or curl. Prints an error and exits if wget or curl is not present.
function download {
Expand Down
7 changes: 4 additions & 3 deletions tenablesc/acceptriskrule.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import (
const acceptRiskRuleEndpoint = "/acceptRiskRule"

// AcceptRiskRuleBaseFields are the fields renderable directly both to and from the API.
// Requests take a list of repositories while all responses only ever return a single repository.
// HostValue response structure also varies depending on type; the client masks out this conversion
// to and from the API structures.
//
// Requests take a list of repositories while all responses only ever return a single repository.
// HostValue response structure also varies depending on type; the client masks out this conversion
// to and from the API structures.
type AcceptRiskRuleBaseFields struct {
ID string `json:"id,omitempty"`
Plugin *BaseInfo `json:"plugin,omitempty"`
Expand Down
4 changes: 3 additions & 1 deletion tenablesc/asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import (
const assetsEndpoint = "/asset"

// Asset defines common fields used in requests and responses for assets
// per https://docs.tenable.com/tenablesc/api/Asset.htm
//
// per https://docs.tenable.com/tenablesc/api/Asset.htm
//
// Some fields are presented abstracted here and internally reformatted for transport.
type Asset struct {
BaseInfo
Expand Down
12 changes: 8 additions & 4 deletions tenablesc/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ type response struct {
}

// NewClient creates a Tenable.SC client object with defaults applied.
// Don't forget to SetAPIKey or SetBasicAuth to ensure you make credentialed queries.
//
// Don't forget to SetAPIKey or SetBasicAuth to ensure you make credentialed queries.
func NewClient(baseURL string) *Client {

c := resty.New().
Expand Down Expand Up @@ -85,7 +86,8 @@ func defaultTenableRetryConditions(resp *resty.Response, err error) bool {
// This function inspects the provided interface for which fields should be requested.
// All `json` field names are included in the list;
// If the field includes `tenable:recurse` tag, then the child structure is also interrogated for
// additional fields to extract.
//
// additional fields to extract.
func getFieldsForStruct(d interface{}) []string {
t := reflect.TypeOf(d)

Expand Down Expand Up @@ -190,7 +192,8 @@ func (c *Client) deleteResource(endpoint string, input interface{}, dest interfa
}

// handleRequest implements the application-side retry and backoff logic for all queries, retrying in case of
// application-side errors that are clearly transient.
//
// application-side errors that are clearly transient.
func (c *Client) handleRequest(method, endpoint string, request *resty.Request, dest interface{}) (*response, error) {
var err error

Expand Down Expand Up @@ -248,7 +251,8 @@ func handleHTTPError(resp *resty.Response) error {
}

// handleResponse's job is to handle finishing the unmarshal, as well as
// wrapping the error if there's an error here.
//
// wrapping the error if there's an error here.
func handleResponse(resp *resty.Response, dest interface{}) error {
respErr := handleHTTPError(resp)

Expand Down
3 changes: 2 additions & 1 deletion tenablesc/currentuser.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import (
const currentUserEndpoint = "/currentUser"

// CurrentUser represents response structure for https://docs.tenable.com/tenablesc/api/Current-User.htm
// This is perfect for testing credential validity and user type.
//
// This is perfect for testing credential validity and user type.
type CurrentUser struct {
BaseInfo
Status string `json:"status,omitempty"`
Expand Down
7 changes: 4 additions & 3 deletions tenablesc/recastriskrule.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ const (
)

// RecastRiskRuleBaseFields are the fields renderable directly both to and from the API.
// Requests take a list of repositories while all responses only ever return a single repository.
// HostValue response structure also varies depending on type; the client masks out this conversion
// to and from the API structures.
//
// Requests take a list of repositories while all responses only ever return a single repository.
// HostValue response structure also varies depending on type; the client masks out this conversion
// to and from the API structures.
type RecastRiskRuleBaseFields struct {
ID string `json:"id,omitempty"`
Organization BaseInfo `json:"organization,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion tenablesc/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ type RepoOrganization struct {
GroupAssign string `json:"groupAssign,omitempty"`
}

//input and output formats are different. Handle the differences internally
// input and output formats are different. Handle the differences internally
type repoInternal struct {
RepoBaseFields
TypeFields json.RawMessage `json:"typeFields,omitempty"`
Expand Down
3 changes: 2 additions & 1 deletion tenablesc/scanresultimport.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ func (c *Client) ImportScanResult(resultImport *ScanResultImport) error {
}

// ImportScanResultFile composes the UploadFile and ImportScanResult calls necessary to import a scan result to a target repository.
// Path is expected to be a path on the local filesystem.
//
// Path is expected to be a path on the local filesystem.
func (c *Client) ImportScanResultFile(path string, repositoryID string, classifyMitigatedAge string, dhcpTracking, scanningVirtualHosts bool) error {

file, err := c.UploadFile(path, "")
Expand Down

0 comments on commit c316181

Please sign in to comment.