MCPcopy Create free account

hub / github.com/assetnote/newtowner / functions

Functions244 in github.com/assetnote/newtowner

↓ 87 callersMethodString
()
internal/providers/bitbucket/bitbucket.go:36
↓ 37 callersFunctionAppendError
AppendError appends a new error string to an existing one.
internal/util/comparison.go:1113
↓ 29 callersMethodClose
()
internal/providers/ssh/ssh.go:195
↓ 16 callersFunctionTruncateString
TruncateString truncates a string to a max length and adds "..." if truncated. If maxLength is less than 3, it will truncate to maxLength without addi
internal/util/stringutil.go:5
↓ 8 callersFunctionResolveHostAndGetGeoLocation
ResolveHostAndGetGeoLocation resolves a hostname to an IP address (the first one found) and then looks up its geolocation.
internal/util/geolocation.go:103
↓ 7 callersMethodClose
()
internal/providers/aws/ec2.go:313
↓ 7 callersFunctionCompareHTTPResponses
(direct RequestDetails, proxied RequestDetails)
internal/util/comparison.go:773
↓ 7 callersFunctionDisplaySingleURLCheckResult
DisplaySingleURLCheckResult takes a result that implements ProviderResultDisplay and prints its details in a standardized format using the provided st
internal/display/display.go:395
↓ 7 callersFunctionMakeHTTPRequest
makeHTTPRequest remains largely the same but might need to add X-My-X-Forwarded-For if we decide to do it client-side
internal/util/http.go:21
↓ 7 callersFunctionTrimmedString
TrimmedString shortens a string to a max length, adding "..." if truncated.
internal/util/comparison.go:1025
↓ 7 callersMethodcleanupRemoteFile
cleanupRemoteFile attempts to delete a file on the remote server.
internal/providers/ssh/ssh.go:464
↓ 7 callersMethodcleanupRemoteFile
cleanupRemoteFile attempts to delete a file on the remote server.
internal/providers/aws/ec2.go:599
↓ 6 callersFunctioncompareAndRecord
Helper function to compare string values and record differences
internal/util/comparison.go:672
↓ 5 callersMethodGetBypassReason
()
internal/display/display.go:42
↓ 4 callersMethodCheckURLs
(urls []string)
internal/providers/ssh/ssh.go:205
↓ 4 callersMethodGetDirectRequestDetails
Overall error for this URL check by the provider
internal/display/display.go:33
↓ 4 callersMethodGetProviderRequestDetails
()
internal/display/display.go:34
↓ 4 callersFunctionIndentString
IndentString prepends each line of a given string with a specified prefix. If the input string is empty, it returns an empty string. If the input stri
internal/util/comparison.go:1077
↓ 4 callersFunctionParseCertificateFromPEM
ParseCertificateFromPEM parses a PEM encoded certificate and returns an x509.Certificate
internal/util/comparison.go:541
↓ 4 callersFunctionSanitizeFilename
Added \s to also replace spaces SanitizeFilename removes or replaces characters that are invalid in filenames.
internal/util/fileutil.go:38
↓ 3 callersFunctionGetAWSRegionFromGeo
GetAWSRegionFromGeo attempts to map a geographic location (country code, city/area name) to a suitable AWS region. It uses a predefined, simplified ma
internal/util/geolocation.go:128
↓ 3 callersMethodGetProviderDisplayName
e.g., "Direct Request Details", "SSH/us-east-1", etc.
internal/display/display.go:37
↓ 3 callersFunctionmaxInt
(a, b int)
internal/display/display.go:116
↓ 2 callersFunctionFormatFullResponse
(details RequestDetails)
internal/util/comparison.go:1035
↓ 2 callersMethodGetComparisonResult
e.g., "Region: us-east-1, ID: xyz", "Workflow Run ID: 12345"
internal/display/display.go:40
↓ 2 callersMethodGetDirectDisplayName
()
internal/display/display.go:36
↓ 2 callersMethodShouldSkipBodyDiff
ShouldSkipBodyDiff indicates if the body diff section should be skipped.
internal/display/display.go:45
↓ 2 callersFunctionbuildTableRows
Helper to build table rows from two columns
internal/display/display.go:137
↓ 2 callersFunctioncompareDatesAndRecord
Helper function to compare dates and record differences
internal/util/comparison.go:681
↓ 2 callersMethodexecuteRemoteCheck
executeRemoteCheck is a generic method to execute remote SSH checks.
internal/providers/aws/ec2.go:456
↓ 2 callersFunctionformatCertLines
(cert *x509.Certificate, certErr string, compare *x509.Certificate, styles DisplayStyles, isLeft bool)
internal/display/display.go:233
↓ 2 callersFunctionformatExtKeyUsages
Helper function to format ExtKeyUsages
internal/util/comparison.go:1210
↓ 2 callersFunctionformatIPAddresses
Helper function to format IP addresses
internal/util/comparison.go:1271
↓ 2 callersFunctionformatKeyUsage
Helper function to format KeyUsage
internal/util/comparison.go:1174
↓ 2 callersFunctionformatRequestLines
Helper to format request details lines
internal/display/display.go:124
↓ 2 callersFunctiongetCertDisplay
(cert *x509.Certificate)
internal/display/display.go:222
↓ 2 callersFunctiongetKeyFile
(keyPath string, passphrase string)
internal/providers/aws/ec2.go:686
↓ 2 callersMethodgetSshClient
getSshClient establishes or returns an existing SSH client for the provider. It centralizes SSH connection logic.
internal/providers/ssh/ssh.go:155
↓ 2 callersFunctionmin
(a, b int)
internal/providers/aws/apigateway.go:519
↓ 2 callersFunctionparseCookieNames
(setCookieHeaders []string)
internal/util/comparison.go:321
↓ 2 callersFunctionrenderSideBySideTable
Helper to render a side-by-side table
internal/display/display.go:153
↓ 2 callersMethodtransferRunnerScriptToTarget
(ctx context.Context, clientGetter func(context.Context) (*ssh.Client, error), targetPath string, logPrefix st
internal/providers/aws/ec2.go:648
↓ 1 callersMethodCheckURLs
CheckURLs performs checks for the given URLs comparing between SSH and EC2 instance
internal/providers/aws/ec2.go:339
↓ 1 callersMethodCheckURLs
CheckURLs performs checks for the given URLs using GitLab Pipelines.
internal/providers/gitlab/gitlab.go:330
↓ 1 callersMethodCheckURLs
CheckURLs performs checks for the given URLs using Bitbucket Pipelines.
internal/providers/bitbucket/bitbucket.go:308
↓ 1 callersFunctionCloseGeoLiteDB
CloseGeoLiteDB closes the MaxMind database. Should be deferred after InitGeoLiteDB.
internal/util/geolocation.go:38
↓ 1 callersFunctionGenerateDiffOutput
GenerateDiffOutput takes two strings and generates a side-by-side, colored diff string using lipgloss for rendering, based on LCS.
internal/util/comparison.go:177
↓ 1 callersFunctionGetFormattedHeaderDiffElements
(comp ComparisonResult)
internal/util/comparison.go:406
↓ 1 callersFunctionGetGeoLocationForIP
GetGeoLocationForIP looks up an IP address in the MaxMind database and returns its geolocation.
internal/util/geolocation.go:45
↓ 1 callersFunctionGetMapKeys
GetMapKeys returns a slice of keys from a map. This is a generic function that works with any comparable key type and any value type.
internal/util/stringutil.go:20
↓ 1 callersMethodGetProcessingError
()
internal/display/display.go:31
↓ 1 callersMethodGetProviderSubDetails
e.g., "API Gateway Request", "GitHub Action Request"
internal/display/display.go:38
↓ 1 callersMethodGetTargetGeoCountry
()
internal/display/display.go:28
↓ 1 callersMethodGetTargetGeoRegion
()
internal/display/display.go:29
↓ 1 callersMethodGetTargetHostname
()
internal/display/display.go:26
↓ 1 callersMethodGetTargetResolvedIP
()
internal/display/display.go:27
↓ 1 callersMethodGetURL
()
internal/display/display.go:25
↓ 1 callersFunctionInitGeoLiteDB
Global variable to hold the opened DB reader InitGeoLiteDB opens the MaxMind GeoLite2 database file. It should be called once during application start
internal/util/geolocation.go:28
↓ 1 callersMethodIsPotentialBypass
()
internal/display/display.go:41
↓ 1 callersFunctionNewBitbucketProvider
NewBitbucketProvider creates and initializes a new Bitbucket Provider.
internal/providers/bitbucket/bitbucket.go:186
↓ 1 callersFunctionNewEC2Provider
NewEC2Provider creates a new EC2 dual SSH provider instance.
internal/providers/aws/ec2.go:150
↓ 1 callersFunctionNewGitLabProvider
NewGitLabProvider creates and initializes a new GitLab Provider.
internal/providers/gitlab/gitlab.go:123
↓ 1 callersFunctionNewProvider
NewProvider creates a new SSH Comparison provider instance.
internal/providers/ssh/ssh.go:107
↓ 1 callersFunctionNewProvider
(ctx context.Context, accessKeyID, secretAccessKey, regionFlagValue string, allRegionsFlag bool)
internal/providers/aws/apigateway.go:108
↓ 1 callersFunctionNewProvider
NewProvider creates and initializes a new GitHub Provider. workflowFile parameter is removed, uses internal constant newtownerWorkflowFileName.
internal/providers/github/github.go:122
↓ 1 callersFunctionNewProvider
NewProvider creates and initializes a new Cloudflare Provider.
internal/providers/cloudflare/cloudflare.go:130
↓ 1 callersFunctionReadURLsFromFile
ReadURLsFromFile reads a file line by line, trims whitespace from each line, and returns a slice of non-empty strings (URLs).
internal/util/fileutil.go:12
↓ 1 callersMethodTransferRunnerScript
TransferRunnerScript copies the http_check_runner.py script (from a hardcoded local path) to the remote server at the path specified by p.remotePython
internal/providers/ssh/ssh.go:502
↓ 1 callersMethodTransferRunnerScript
TransferRunnerScript copies the http_check_runner.py script to both SSH instances over scp
internal/providers/aws/ec2.go:636
↓ 1 callersFunctioncompareBoolAndRecord
Helper function to compare boolean values and record differences
internal/util/comparison.go:693
↓ 1 callersFunctioncompareExtKeyUsageAndRecord
Helper function to compare ExtKeyUsage and record differences
internal/util/comparison.go:717
↓ 1 callersFunctioncompareExtKeyUsageSlices
Helper function to compare ExtKeyUsage slices (order independent)
internal/util/comparison.go:1156
↓ 1 callersFunctioncompareKeyUsageAndRecord
Helper function to compare KeyUsage and record differences
internal/util/comparison.go:705
↓ 1 callersFunctioncompareNetIPSlices
Helper function to compare IP addresses
internal/util/comparison.go:1253
↓ 1 callersFunctioncompareSANsAndRecord
Helper function to compare Subject Alternative Names and record differences
internal/util/comparison.go:729
↓ 1 callersFunctioncompareSSLCertificates
Helper function to compare two SSL certificates and populate comparison result
internal/util/comparison.go:557
↓ 1 callersFunctioncompareStringSlices
Helper function to compare string slices (order independent for SANs, etc.)
internal/util/comparison.go:1138
↓ 1 callersMethodcreateAPIGatewayV1
createAPIGatewayV1 uses the passed region-specific client.
internal/providers/aws/apigateway.go:366
↓ 1 callersMethoddeleteAPIGatewayV1
deleteAPIGatewayV1 uses the passed region-specific client.
internal/providers/aws/apigateway.go:503
↓ 1 callersMethoddeployWorker
deployWorker deploys the Cloudflare Worker script and returns the worker URL.
internal/providers/cloudflare/cloudflare.go:219
↓ 1 callersMethoddetectRegions
detectRegions attempts to automatically detect geographic regions for both EC2 and SSH hosts using IP geolocation and AWS region mapping.
internal/providers/aws/ec2.go:709
↓ 1 callersMethoddownloadAndParseArtifactsBatch
downloadAndParseArtifact downloads, unzips, and parses the artifact files. This function is now modified to downloadAndParseArtifactsBatch and handle
internal/providers/github/github.go:503
↓ 1 callersMethoddownloadAndParseArtifactsBatch
downloadAndParseArtifactsBatch downloads and parses the result.json artifact from a specific job in a pipeline. It now returns the job ID of the job f
internal/providers/gitlab/gitlab.go:213
↓ 1 callersMethoddownloadAndParseArtifactsBatch
downloadAndParseArtifactsBatch downloads and parses the result.json artifact from a specific step in a pipeline.
internal/providers/bitbucket/bitbucket.go:646
↓ 1 callersFunctionensureMMDBFile
ensureMMDBFile checks if the MaxMind DB file exists, and if not, or if forceUpdate is true, downloads it.
cmd/newtowner/main.go:137
↓ 1 callersMethodexecuteEC2Check
executeEC2Check executes HTTP check via the primary EC2 instance.
internal/providers/aws/ec2.go:451
↓ 1 callersMethodexecuteRemoteSshCheck
executeRemoteSshCheck connects to the remote server, runs the http_check_runner.py script (saving output to a temp file), downloads the temp file via
internal/providers/ssh/ssh.go:316
↓ 1 callersMethodexecuteSSHCheck
executeSSHCheck executes HTTP check via the secondary SSH instance.
internal/providers/aws/ec2.go:446
↓ 1 callersFunctionformatRequestDetailsTable
formatRequestDetailsTable creates a side-by-side string for direct and provider requests.
internal/display/display.go:176
↓ 1 callersFunctionformatSSLCertificateComparisonTable
formatSSLCertificateComparisonTable creates a side-by-side string for SSL certificate differences.
internal/display/display.go:273
↓ 1 callersFunctiongenerateLCSDiffOperations
generateLCSDiffOperations performs a line-based LCS diff and returns a sequence of operations.
internal/util/comparison.go:122
↓ 1 callersMethodgetClientForRegion
(targetRegion string)
internal/providers/aws/apigateway.go:178
↓ 1 callersFunctiongetKeyFile
(keyPath string, passphrase string)
internal/providers/ssh/ssh.go:294
↓ 1 callersMethodgetWorkerScript
getWorkerScript returns the JavaScript code for the Cloudflare Worker. In a production environment, this could be embedded or read from a file.
internal/providers/cloudflare/cloudflare.go:270
↓ 1 callersMethodgetWorkflowIDByName
getWorkflowIDByName fetches the ID of a workflow by its filename.
internal/providers/github/github.go:168
↓ 1 callersFunctionhandleCertParseFailure
Helper to handle cases where certificate parsing failed
internal/util/comparison.go:750
↓ 1 callersFunctionisIgnorableDirectError
isIgnorableDirectError checks if the error message from a direct request indicates a type of error (like TLS handshake failures) that should be consid
internal/util/comparison.go:515
↓ 1 callersMethodmakeWorkerRequest
makeWorkerRequest sends a request to the Cloudflare Worker with the specified URLs.
internal/providers/cloudflare/cloudflare.go:576
↓ 1 callersFunctionmake_request
Makes an HTTP GET request and returns details as a dictionary.
scripts/http_check_runner.py:14
↓ 1 callersFunctionmax
(a, b int)
internal/util/comparison.go:314
next →1–100 of 244, ranked by callers