We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

glennguzzo
ServiceNow Employee

PCI data can easily be entered into Task records (e.g. Incidents and Cases) and be maintained, and without Data Discovery it could take sometime for it to be anonymise it.

 

A business rule checks before an insert or update, to check whether any field has a 16 digit alphanumeric code with spaces or dashes, and then tests these on common Javascript formulas, then Aborts submission, and logs the attempt.

 

With Work Notes or Comments, it uses an OnChange Client script to remove the entry.

 

Use at your own risk.  This is something I have mocked up on my sandpit and works with the several credit cards that I have.

 

Also, please look at out of the box features, Data Classification, Data Privacy and Data Privacy.

1 Comment
glennguzzo
ServiceNow Employee

noticed a small bug if sixteen zeros in a row.  update to code below

        if (fieldName.match(/[a-f0-9]{32}/)) {
            // skip SysIDs
		} else if (fieldName.match(/[0]{15}/)){
			// skip 16 zeros in a row		
        } else if (fieldName.match(/((?:\d[ -]?){15}\d)/g)) {            
			var match = fieldName.match(/((?:\d[ -]?){15}\d)/g);			
            for (j = 0; j < match.length; j++) {
				match[j] = match[j].replace(/\s+/g, ''); // strip space
                match[j] = match[j].replace(/-/g, ''); // strip dash 
                if (match[j].match(/[0-9]{16}/) && !match[j].match(/[0]{16}/)) { // match 16 digit string but not 16 zeros