This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python3 -m venv _venv | |
source _venv/bin/activate | |
pip install --upgrade pip # because wheel | |
pip install conan | |
conan remote add f0cal https://api.bintray.com/conan/f0cal/conan | |
conan install lttng-ust/2.10@f0cal/testing | |
conan install lttng-tools/2.10@f0cal/testing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//query Okta for all users (sys_users) that do not have Okta IDs | |
// this may take a while to run for large user counts | |
getOktaUserIDs(); | |
function getOktaUserIDs() { | |
var users = new GlideRecord("sys_user"); | |
if (!users.isValidField("x_okta2_actpack_okta_id")) { | |
gs.error("Okta ID (x_okta2_actpack_okta_id) does not exist on sys_user table"); | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var table = ""; | |
var roleName = ""; | |
//call is after class definition | |
var myACLUtils = Class.create(); | |
myACLUtils.prototype = { | |
initialize: function() {}, | |
createDefaultTableACLs: function(table, roleName) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//run in global scope as background script | |
/**** set these variables before running ****/ | |
var vendorName = "--CAVUCode--"; | |
var appID = "---AddAppSysIDHere---"; | |
/**** after setting variabless above, uncomment this line to run ****/ | |
//updateAppFiles(vendorName, appID); | |
function updateAppFiles(vendorName, appID) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//create sample CIs based on vul items | |
//createVulCIs(); | |
linkVulsToCIs(); | |
function createVulCIs() { | |
var item = new GlideAggregate("sn_vul_vulnerable_item"); | |
item.activeQuery(); | |
item.addNotNullQuery("dns"); | |
item.groupBy("dns"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Must be run from backgroup script as a user with the elevated security_admin role | |
*/ | |
// migrate incident id values | |
migrateIncidents(); | |
// migrate group attributes from legacy update set application to the new Fuji store app | |
migrateGroups(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<j:jelly trim="false" xmlns:g2="null" xmlns:g="glide" xmlns:j2="null" xmlns:j="jelly:core"> | |
<!-- get the scope of the current record and list of tables to display--> | |
<g:evaluate var="jvar_my_scope"> | |
var scope = new GlideRecord("sys_scope"); scope.get("scope", gs.getCurrentScopeName()); scope; | |
</g:evaluate> | |
<g:evaluate expression="scope.getDisplayValue()" var="jvar_my_scope_name"/> | |
<g:evaluate expression="scope.getUniqueValue()" var="jvar_my_scope_id"/> | |
<g:evaluate expression="gs.getProperty(scope.scope + '.config_file_tables','')" var="jvar_config_tables"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//change to sysid of app you want to scan | |
var appID = "e32a61c94f198a004f167d2ca310c72a"; | |
reviewTransformChoiceActionsForApp(appID); | |
function reviewTransformChoiceActionsForApp(appId) { | |
var entry = new GlideRecord("sys_transform_entry"); | |
entry.addQuery("sys_scope", appId); | |
entry.orderBy("map"); | |
entry.query(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Generate a random GlideDateTime | |
* If start and end are not specified you'll get a random date within the past year | |
* | |
* @param [start] GlideDateTime - optionally defines the start of the window | |
* @param [end] GlideDateTime - optionally defines the end of the window | |
* @return GlideDateTime | |
*/ | |
function generateRandomDate(/*[GlideDateTime]*/start, /*[GlideDateTime]*/ end){ | |
var temp = new GlideDateTime(); |