
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
github.com/cdillond/cms
I created this to play around with channels in Go. It should not be considered production ready. This package is intended to be as general and adaptable as possible, so it provides very little in the way of specific features.
// implement the Message interface
type ExampleMessage struct {
Id string
Content string
Time time.Time
}
func (e ExampleMessage) UpdateAt() time.Time {
return e.Time
}
func (e ExampleMessage) ContentId() string {
return e.Id
}
// realistically, the Publish() method will contain more complicated logic
func (e ExampleMessage) Publish() error {
fmt.Println(e.Content)
return nil
}
// implement the ErrorHandler interface
type ExampleErrorHandler struct{}
func (e ExampleErrorHandler) HandleError(err error, msg msgq.Message) {
fmt.Println(err.Error(), msg)
}
func main() {
MsgQ := msgq.New()
listenChan, done := MsgQ.Run()
//TODO more complex example
source := []ExampleMessage{{"1","content", time.Now().Add(time.Second)}, {"2", "content 2", time.Now()}}
for _, msg := range source {
listenChan <- msg
}
// wait for messages to be published
time.Sleep(3*time.Second)
// shut down
close(listenChan)
<- done
}
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.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.