Exploit databaseDownload repository ZIP
GH-562a516151f045835c0ee477b90de486
barrersoftware/opencode-secure
Sources for CVE-2026-22812
6 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files15
barrersoftware/opencode-secureRevision 806a6c7399a1
- ↑..Parent directory
- drizzle/
- schema/
- util/
- account.ts
- actor.ts
- aws.ts
- billing.ts
- black.ts
- context.ts
- identifier.ts
- key.ts
- model.ts
- provider.ts
- user.ts
- workspace.ts
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
packages/console/core/src/aws.ts
TypeScript · 1,740 bytesimport { z } from "zod"
import { Resource } from "@opencode-ai/console-resource"
import { AwsClient } from "aws4fetch"
import { fn } from "./util/fn"
export namespace AWS {
let client: AwsClient
const createClient = () => {
if (!client) {
client = new AwsClient({
accessKeyId: Resource.AWS_SES_ACCESS_KEY_ID.value,
secretAccessKey: Resource.AWS_SES_SECRET_ACCESS_KEY.value,
region: "us-east-1",
})
}
return client
}
export const sendEmail = fn(
z.object({
to: z.string(),
subject: z.string(),
body: z.string(),
replyTo: z.string().optional(),
}),
async (input) => {
const res = await createClient().fetch("https://email.us-east-1.amazonaws.com/v2/email/outbound-emails", {
method: "POST",
headers: {
"X-Amz-Target": "SES.SendEmail",
"Content-Type": "application/json",
},
body: JSON.stringify({
FromEmailAddress: `OpenCode Zen <[email protected]>`,
Destination: {
ToAddresses: [input.to],
},
...(input.replyTo && { ReplyToAddresses: [input.replyTo] }),
Content: {
Simple: {
Subject: {
Charset: "UTF-8",
Data: input.subject,
},
Body: {
Text: {
Charset: "UTF-8",
Data: input.body,
},
Html: {
Charset: "UTF-8",
Data: input.body,
},
},
},
},
}),
})
if (!res.ok) {
throw new Error(`Failed to send email: ${res.statusText}`)
}
},
)
}