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/ikawaha/holiday
This is a list of holidays announced by the Cabinet Office as national holidays. This list is compared with the Cabinet Office's list once a month, and a pull-request is created when there is an update.
package main
import (
"fmt"
"time"
"github.com/ikawaha/holiday"
)
func main() {
dates := []string{"2021/07/23", "2021/10/10"}
for _, v := range dates {
// YYYY/MM/DD
day, ok := holiday.IsHolidayYYYYMMDD(v)
fmt.Printf("IsHolidayYYYYMMDD(%s)= %q, %v\n", v, day, ok)
// time.Time
t, err := time.Parse(holiday.DateFormat, v)
if err != nil {
panic(err)
}
day, ok = holiday.IsHoliday(t)
fmt.Printf("IsHoliday(%s)= %q, %v\n", v, day, ok)
}
}
Output:
IsHolidayYYYYMMDD(2021/07/23)= "スポーツの日" true
IsHoliday(2021/07/23)= "スポーツの日" true
IsHolidayYYYYMMDD(2021/10/10)= "" false
IsHoliday(2021/10/10)= "" false
MIT
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.