Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
burp-brightscript
Advanced tools
Burp is an independent open-source project, maintained exclusively by volunteers.
You might want to help! Get in touch via the slack group, or raise issues.
It's a simple tool for executing regex replacements on source code files, a bit like awk. The killer feature is that it understands brightscript syntax, so it knows what line and function it's in. It can be used from command line, or from a js environment (such as when using gulp for building)
The following working gulpfile can be found in my roku MVVM spike; but the process is as follows.
npm install burp-brightscript --save-dev
export function addDevLogs(cb) {
let config: BurpConfig = {
"sourcePath": "build/.roku-deploy-staging",
// "sourcePath": "build/wtf",
"globPattern": "**/*.brs",
"replacements": [
{
"regex": "(^.*(logInfo|logError|logVerbose|logDebug)\\((\\s*\"))",
"replacement": "$1#FullPath# "
},
{
"regex": "(^.*(logMethod)\\((\\s*\"))",
"replacement": "$1#FullPath# "
}
]
}
const processor = new BurpProcessor(config);
processor.processFiles();
cb();
}
npm install -g burp-brightscript
burpConfig.json
containing:export function addDevLogs(cb) {
let config: BurpConfig = {
"sourcePath": "build/.roku-deploy-staging",
// "sourcePath": "build/wtf",
"globPattern": "**/*.brs",
"replacements": [
{
"regex": "(^.*(logInfo|logError|logVerbose|logDebug)\\((\\s*\"))",
"replacement": "$1#FullPath# "
},
{
"regex": "(^.*(logMethod)\\((\\s*\"))",
"replacement": "$1#FullPath# "
}
]
}
const processor = new BurpProcessor(config);
processor.processFiles();
cb();
}
burp burpConfig.json
You can use the following constants in your regex replacements:
#FullPath#
- full path of file#LineNumber#
- line number of replacement#FileName#
- filename of replacement#FunctionName#
- function name of replacement#CommentLine#
- will result in the line being commented outI like the name. It doesn't mean anything.
I also made rLog and needed a tool that could process source files to insert the line number and function name. I figured this is a more generally useful way of doing it, which other's might leverage in their own tool-chains and build processes.
FAQs
lightweight processor for roku brightscript projects
We found that burp-brightscript demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.