bx-esapi — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited bx-esapi (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
install-bx-module bx-esapi
# CommandBox
box install bx-esapi| BIF | Description |
|---|---|
encodeFor( context, value ) | Encode for a named context (see list below) |
encodeForHTML( value, [canonicalize] ) | Encode for HTML body content |
encodeForHTMLAttribute( value, [canonicalize] ) | Encode for HTML attribute values |
encodeForJavaScript( value, [canonicalize] ) | Encode for inline JavaScript |
encodeForCSS( value, [canonicalize] ) | Encode for CSS values |
encodeForURL( value, [canonicalize] ) | URL-encode a value |
encodeForSQL( value, dialect, [canonicalize] ) | Encode for SQL contexts |
encodeForXML( value, [canonicalize] ) | Encode for XML content |
encodeForXMLAttribute( value, [canonicalize] ) | Encode for XML attribute values |
encodeForXPath( value, [canonicalize] ) | Encode for XPath queries |
encodeForLDAP( value, [canonicalize] ) | Encode for LDAP queries |
encodeForDN( value, [canonicalize] ) | Encode for LDAP Distinguished Names |
encodeFor() ContextsCSS, DN, HTML, HTMLAttribute, JavaScript, LDAP, SQL, URL, XML, XMLAttribute, XPath
<!-- HTML body -->
<bx:output>
<h2>#encodeForHTML( user.displayName )#</h2>
<p>#encodeForHTML( user.bio )#</p>
</bx:output>
<!-- HTML attribute -->
<bx:output>
<a href="#encodeForHTMLAttribute( user.profileUrl )#">Profile</a>
<img src="/img/avatar.png" alt="#encodeForHTMLAttribute( user.displayName )#" />
</bx:output>
<!-- Inline JavaScript -->
<bx:output>
<script>
var username = "#encodeForJavaScript( user.username )#";
var userId = #encodeForJavaScript( user.id )#;
</script>
</bx:output>
<!-- URL parameters -->
<bx:output>
<a href="/search?q=#encodeForURL( form.searchTerm )#">Search</a>
</bx:output>encodeFor()// Using the generic BIF
safeHtml = encodeFor( "HTML", user.comment )
safeJs = encodeFor( "JavaScript", user.name )
safeUrl = encodeFor( "URL", queryParam )
safeAttr = encodeFor( "HTMLAttribute", user.title )// Decode from specific contexts
decoded = decodeFromHTML( "<script>" ) // Returns: <script>
decoded = decodeFromURL( "hello%20world" ) // Returns: hello world
decoded = decodeFromBase64( encodedString )
decoded = decodeFrom( "HTML", "<p>content</p>" )Canonicalization normalizes encoded input before encoding. Useful to detect double-encoded attacks:
// With canonicalize=true: first decodes, then re-encodes
// With canonicalize=false (default): encode as-is
safe = encodeForHTML( userInput, true )// Sanitize HTML with AntiSamy (built-in safelists)
// Removes dangerous tags while allowing safe formatting
clean = htmlSanitize( userHtmlInput )
// Use specific AntiSamy policy
clean = htmlSanitize( userHtmlInput, "antisamy-slashdot" )
// Policies: antisamy (default), antisamy-slashdot, antisamy-ebay, antisamy-myspace, antisamy-anythinggoes// Form output — always encode when displaying user data
function renderUserProfile( user ) {
return "
<div class='profile'>
<h1>#encodeForHTML( user.name )#</h1>
<p class='bio'>#encodeForHTML( user.bio )#</p>
<a href='#encodeForHTMLAttribute( user.website )#'>
#encodeForHTML( user.websiteLabel )#
</a>
</div>
"
}
// URL building
function buildSearchUrl( term, category ) {
return "/search?q=#encodeForURL( term )#&category=#encodeForURL( category )#"
}encodeForHTML() inside JavaScript — use encodeForJavaScript() insteadencodeForHTML() inside HTML attribute values — use encodeForHTMLAttribute()htmlSanitize() (AntiSamy) when you want to allow SOME HTML but not arbitrary markupencodeForSQL() should not replace parameterized queries — use queryExecute() with proper params insteadcanonicalize=true when processing input that may have been double-encoded~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.