Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
github.com/deep-space-cartel/fooddata-central-client-go/v2
The FoodData Central API provides REST access to FoodData Central (FDC). It is intended primarily to assist application developers wishing to incorporate nutrient data into their applications or websites. To take full advantage of the API, developers should familiarize themselves with the database by reading the database documentation available via links on Data Type Documentation. This documentation provides the detailed definitions and descriptions needed to understand the data elements referenced in the API documentation. Additional details about the API including rate limits, access, and licensing are available on the FDC website
This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.
Put the package under your project folder and add the following in import:
import "./swagger"
All URIs are relative to https://api.nal.usda.gov/fdc
Class | Method | HTTP request | Description |
---|---|---|---|
FDCApi | GetFood | Get /v1/food/{fdcId} | Fetches details for one food item by FDC ID |
FDCApi | GetFoods | Get /v1/foods | Fetches details for multiple food items using input FDC IDs |
FDCApi | GetFoodsList | Get /v1/foods/list | Returns a paged list of foods, in the 'abridged' format |
FDCApi | GetFoodsSearch | Get /v1/foods/search | Returns a list of foods that matched search (query) keywords |
FDCApi | GetJsonSpec | Get /v1/json-spec | Returns this documentation in JSON format |
FDCApi | GetYamlSpec | Get /v1/yaml-spec | Returns this documentation in JSON format |
FDCApi | PostFoods | Post /v1/foods | Fetches details for multiple food items using input FDC IDs |
FDCApi | PostFoodsList | Post /v1/foods/list | Returns a paged list of foods, in the 'abridged' format |
FDCApi | PostFoodsSearch | Post /v1/foods/search | Returns a list of foods that matched search (query) keywords |
Example
auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{
Key: "APIKEY",
Prefix: "Bearer", // Omit if not necessary.
})
r, err := client.Service.Operation(auth, args)
go install -v github.com/go-critic/go-critic/cmd/gocritic@latest
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
go install golang.org/x/tools/cmd/goimports@latest
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.