Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
gitlab.com/mxmz/google-drive-query-builder
This package helps build search queries for Google Drive Search API.
Drive files.list
API and search syntax are documented here:
The example below searches for documents matching the following criteria:
package main
import (
"context"
"fmt"
"log"
q "gitlab.com/mxmz/google-drive-query-builder/query"
"golang.org/x/oauth2/google"
drive "google.golang.org/api/drive/v3"
)
func main() {
var stm1 = q.MimeType().Equal("text/plain")
var stm2 = q.Name().Contains("Foo")
var query = q.
Query(stm1).
And(stm2).
Or(q.Raw(`name = "pluto"`)).
And(q.CreatedTime().After(time.Now().Add(-10 * time.Hour)))
ctx := context.Background()
client, _ := google.DefaultClient(ctx, drive.DriveScope)
driveSvc, _ := drive.New(client)
var svc = drive.NewFilesService(driveSvc)
lst, _ := svc.List().
Q(q.Stringize(query)).
Fields("files(name,createdTime,properties)").
OrderBy("createdTime").
PageSize(1000).
Do()
for _, v := range lst.Files {
log.Printf("%s %v \n", v.Name, v.CreatedTime)
}
}
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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.