
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@bubojs/uploader-firebase
Advanced tools
This uploader allows you to use Firebase Storage
declaration of a storage instance (only one per project needed but you can add as many as you need)
import { FirebaseInstance } from '../bubo.middlewares/uploader/Firebase'
import { env } from './constants'
export const firebase = new FirebaseInstance({
privateKey: env.FIREBASE.privateKey,
clientEmail: env.FIREBASE.clientEmail,
projectId: env.FIREBASE.projectId
})
import { Upload } from '@bubojs/uploader-firebase'
import { firebase } from '../../config/Firebase'
import { Controller, DefaultActions, BeforeMiddleware, Post } from '@bubojs/api'
@Controller()
class TestController {
@Upload(
firebase,
{ folder: 'test_folder', keepName: false, preserveExtension: true },
['fieldOne', 'fieldTwo'],
['jpeg', 'png']
)
@Post('/')
async testRoute() {
console.log('uploaded files')
return {}
}
the Upload Middleware takes arguments :
once the upload is done the firebase key of the uploaded file is stored in the field that contained the file in the req.body, the other fields are simply copied in the req.body
the uploader instance (firebase here) provides a download route, we use the rawHandler option in our custom route to pass the constructor of the download endpoint then we return from our builder function the result of firebaseInstance.buildDownloadEndpoint.
The function takes two parameters: -> the cache with maxAge that is sent to the response header during the download -> retrieveKeyCallback which defines the function to retrieve the firebase key based on what is passed in the request
@Get(':id/image', { rawHandler: true, bodyFormat: BodyFormat.AUTO })
dowloadImageBuilder() {
return firebase.buildDownloadEndpoint({
cache: { maxAge: 4 },
retrieveKeyCallback: async (req: any) => {
const img = await image.findOneByNoThrow('id', req.params.id)
return image.fileKey
}
})
}
FAQs
Unknown package
We found that @bubojs/uploader-firebase demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.