{"id":34209088,"url":"https://github.com/nicheinc/sfdcclient","last_synced_at":"2026-03-12T17:32:50.889Z","repository":{"id":46246885,"uuid":"241901998","full_name":"nicheinc/sfdcclient","owner":"nicheinc","description":"Salesforce HTTP client using OAuth 2.0 JWT bearer token flow ","archived":false,"fork":false,"pushed_at":"2025-10-23T19:49:42.000Z","size":197,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-12-26T17:50:51.675Z","etag":null,"topics":["backend","hacktoberfest","hacktoberfest2020","library","salesforce","salesforce-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nicheinc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-20T14:15:44.000Z","updated_at":"2025-10-23T19:49:45.000Z","dependencies_parsed_at":"2024-06-03T16:57:57.497Z","dependency_job_id":"6a71af2b-a13d-44e1-836b-1ca01290ebba","html_url":"https://github.com/nicheinc/sfdcclient","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/nicheinc/sfdcclient","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicheinc%2Fsfdcclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicheinc%2Fsfdcclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicheinc%2Fsfdcclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicheinc%2Fsfdcclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicheinc","download_url":"https://codeload.github.com/nicheinc/sfdcclient/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicheinc%2Fsfdcclient/sbom","scorecard":{"id":684457,"data":{"date":"2025-08-11","repo":{"name":"github.com/nicheinc/sfdcclient","commit":"b4bd15b3121ecca54bdafba322015ed0df63259c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.9,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/ci.yaml:3","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":5,"reason":"Found 4/7 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yaml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/nicheinc/sfdcclient/ci.yaml/master?enable=pin","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":7,"reason":"9 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":5,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'master'","Info: 'force pushes' disabled on branch 'master'","Info: 'branch protection settings apply to administrators' is required to merge on branch 'master'","Warn: 'stale review dismissal' is disabled on branch 'master'","Warn: required approving review count is 1 on branch 'master'","Warn: codeowners review is not required on branch 'master'","Warn: 'last push approval' is disabled on branch 'master'","Info: 'up-to-date branches' is required to merge on branch 'master'","Info: status check found to merge onto on branch 'master'","Info: PRs are required in order to make changes on branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2025-3553 / GHSA-mh63-6h87-95cp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T00:18:48.267Z","repository_id":46246885,"created_at":"2025-08-22T00:18:48.267Z","updated_at":"2025-08-22T00:18:48.267Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30435207,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T14:34:45.044Z","status":"ssl_error","status_checked_at":"2026-03-12T14:09:33.793Z","response_time":114,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","hacktoberfest","hacktoberfest2020","library","salesforce","salesforce-api"],"created_at":"2025-12-15T20:33:18.210Z","updated_at":"2026-03-12T17:32:50.882Z","avatar_url":"https://github.com/nicheinc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sfdcclient\n\n![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/nicheinc/sfdcclient)\n![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/nicheinc/sfdcclient)\n[![Go Report Card](https://goreportcard.com/badge/github.com/nicheinc/sfdcclient)](https://goreportcard.com/report/github.com/nicheinc/sfdcclient)\n![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/nicheinc/sfdcclient)\n\nsfdcclient is a golang package implementing a pseudo-wrapper of an HTTP client,\nfor making requests to salesforce's REST API through a connected app,\nmaking use of the [Salesforce OAuth 2.0 JWT Bearer Flow for Server-to-Server](https://help.salesforce.com/articleView?id=remoteaccess_oauth_jwt_flow.htm\u0026type=5)\nauthorization flow.\n\n## Installation\n\n`go get https://github.com/nicheinc/sfdcclient`\n\n## Example usage\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/nicheinc/sfdcclient\"\n)\n\nfunc main() {\n\t// Read your private key into memory\n\tprivateKeyBytes, err := os.ReadFile(os.ExpandEnv(\"/path/to/your/private/key/file.key\"))\n\tif err != nil {\n\t\tlog.Fatalf(\"Error creating logger: %s\", err)\n\t}\n\n\tclient, err := sfdcclient.NewClientWithJWTBearer(\n\t\ttrue, // whether the instance the client connects to, is a sandbox or not\n\t\t\"https://xx123.salesforce.com\",\n\t\t\"your_connected_app_consumer_key\",\n\t\t\"username_using_the_connected_app@email_provider.com\",\n\t\tprivateKeyBytes,\n\t\t3*time.Second, // request timeout for the OAuth new token HTTP request (3 minute max)\n\t\thttp.Client{ // underlying HTTP client making all HTTP calls\n\t\t\tTimeout: 5 * time.Second,\n\t\t},\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"Error initializing connected app salesforce client: %s\", err)\n\t}\n\n\turl := \"/services/data/v47.0/sobjects/MySObjectName/describe\" // note that this is a relative URL to the salesforce instance server URL\n\tstatusCode, resBody, err := client.SendRequest(context.Background(), http.MethodGet, url, nil, nil)\n\tif err != nil {\n\t\tlog.Fatalf(\"Error sending salesforce request: %s\", err)\n\t}\n\n\tfmt.Printf(\"\\nResponse status code: %d\", statusCode) // -1 if an error is returned by the SendRequest call\n\tfmt.Printf(\"\\nResponse body: %s\", string(resBody))\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicheinc%2Fsfdcclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicheinc%2Fsfdcclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicheinc%2Fsfdcclient/lists"}