Package com.google.javascript.jscomp
Class ConformanceRules.SecuritySensitiveAttributes
- java.lang.Object
-
- com.google.javascript.jscomp.ConformanceRules.SecuritySensitiveAttributes
-
- Enclosing class:
- ConformanceRules
public static final class ConformanceRules.SecuritySensitiveAttributes extends java.lang.ObjectChecks nodes for conformance with banning the setting of attributes that are on the blocklist.
-
-
Field Summary
Fields Modifier and Type Field Description static com.google.common.collect.ImmutableSet<java.lang.String>BANNED_ATTRSSecurity-sensitive attributes that are banned from being set.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ConformanceRules.ConformanceResultcheckConformanceForAttributeName(NodeTraversal traversal, Node attrName)Given aNodeTraversalandNode, check if the attribute violates conformance.
-
-
-
Field Detail
-
BANNED_ATTRS
public static final com.google.common.collect.ImmutableSet<java.lang.String> BANNED_ATTRS
Security-sensitive attributes that are banned from being set.Making updates to these attributes requires a new JSCompiler release. You must test the change using a global presubmit "at head" and update any affected allowlists. See go/jscompiler-global-presubmit and go/tsjs-conformance-team-docs.
-
-
Method Detail
-
checkConformanceForAttributeName
public static ConformanceRules.ConformanceResult checkConformanceForAttributeName(NodeTraversal traversal, Node attrName)
Given aNodeTraversalandNode, check if the attribute violates conformance.A violation is returned if the attribute name cannot be determined (and it is not an xid), if the attribute is on a list of banned attributes, or if it begins with the letters "on". Otherwise, it is a conforming attribute.
-
-