From b13fa9a7f7db9caa51ff7033d803ac5edf642cdc Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 29 May 2023 13:15:10 -0500 Subject: [PATCH 1/5] add new OS icons, update query-details, query-library, and osquery-table-details --- .../assets/images/os-chromeos-dark-24x24@2x.png | Bin 0 -> 1618 bytes website/assets/images/os-linux-dark-24x24@2x.png | Bin 0 -> 1524 bytes website/assets/images/os-macos-dark-24x24@2x.png | Bin 0 -> 1087 bytes .../assets/images/os-windows-dark-24x24@2x.png | Bin 0 -> 494 bytes .../js/pages/osquery-table-details.page.js | 1 + website/views/pages/osquery-table-details.ejs | 9 ++++++--- website/views/pages/query-detail.ejs | 7 ++++--- website/views/pages/query-library.ejs | 13 +++++++++---- 8 files changed, 20 insertions(+), 10 deletions(-) create mode 100644 website/assets/images/os-chromeos-dark-24x24@2x.png create mode 100644 website/assets/images/os-linux-dark-24x24@2x.png create mode 100644 website/assets/images/os-macos-dark-24x24@2x.png create mode 100644 website/assets/images/os-windows-dark-24x24@2x.png diff --git a/website/assets/images/os-chromeos-dark-24x24@2x.png b/website/assets/images/os-chromeos-dark-24x24@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..abee9a3069e1fcee5fb36ede9a46250c756a8d19 GIT binary patch literal 1618 zcmV-Y2CeytP)Z*Ys-aByzD)f@|rLT*WVsQV2TDuLBY;1gg}h;qZ+qL>PE>kWEofrD8-0q%wN z79%Bs8_p-FE78^{-krWTyKB#`*Y?gr2tUd4?#%4Wym|lMAlv{ftDF4J0;D!1i^BF(yFU zcnLx$d_5rGu8U(Eri2&~FgL%te$yL|0wt7d2b&v-$0r$N6<_4hbq;Cv8MqZ-Q{vcn zNw^_K4fuZk$7d)zuWxVj44LOOdF@dn$A)!!B7;?W%);#>OKV$G(@){-?aA+h1`Q;@ zm-jM!Y><^3Mno(D*8FpeMCNC>D-u`hK?TXa_fpVnm-8NhjWi}?!b`d{V zZo}O}PFcbTVnyiu%}MjCubj|bI$0L{Q zz0Eq@GL#PR>GS5*R%B-<==8Y3QRHAqz-@VT@6pHDJi`|ur=YbJtm0}R*btvA#V5yc zACsS;;Hy%O>nj#Z`3_|A{M>0zG;F)viW^63l`#>Q!$4Y_4_I*krCbhmy0{fQ`-Ie^ z6Y$B~zP@xfLy;;wz}bbhiz}JAaENgJ;rQiW+(u%$7@fzP!`$kTXn(8rssc6Hxrh!R zW95a0B{y@#LN;w?=2(6E z^NI4aw^;9#n0=wmGl7mgPPPFrP-B9F7Td12SX99foCT88bq7V6IWhikS2o$K(qD^D zu(ns()d!+PnUOJ2;!a$9CY!l-me%%t1tUdeA{haEQXE#m9Rw4QNb^bK zmvyVb=oqs+2IQrKM^7Zpz)GCdbcM_+!(;jISZO%0srwUik;JATkK0H(T$xqP0jVia zh0m$L4pD!10nIW&lubdKdS~>FBez0}wma2yTntgdQd11O;jBQ@P?ZNOe&mA7kcyaq7W0e^a@`$RJSh)}qb71Viv$!r}faWxl&*m9$*&K-WqV zb|`IJr^#)B?vb7c2l;Ww6*>FhRo7^^D7IAUWC*?pfi5u`(&|D|=p`FAo0N<1n9sq5 zgkCP*cfm2cuu8cp-1uDpv%R)oQE8*6xXy73%cCrv-qIJ1(kYobr9=zsY!|Y#oFb3t zbAD>BXalpDZ21b@AgJ89-4mS`d<|PNoqwZ?d+_uk zGf8BR$ij$QTK&jV+@YIqd6DYGq{-&hN{|v>#m*`CmF-BH=|zgcxPj3oi3%zCk^A4o z?x6DfD5NGpM~@hoK>=UZeyhv|eg4f4UE5-dHrtRcyra`@K>MDZcGEik2U(8eRP6`p Q5&!@I07*qoM6N<$f~w*3Z2$lO literal 0 HcmV?d00001 diff --git a/website/assets/images/os-linux-dark-24x24@2x.png b/website/assets/images/os-linux-dark-24x24@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..1f044f200d10ce7002b5e73ce35fb8c3a0168f65 GIT binary patch literal 1524 zcmVV>am3>tbofK0h&6y@wVsobhr8)cy00p9?!tSC#1a#?+Ya$>DZ0Z!4 z=9CT>iLS&~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wR{1vb+Vg;H5EeX9bjg8bCTU9H6}Qe+eXeI{eouQI@OVjG(Upx`L5_mB zrAHzI5Z4YfR_KvZcgSEA=NG=)hJ;{EU2f|_x!j|L$wt;jgLTniVZNwqXI958GrE?a zy5OrSbt09BXh+mXBMJZ*X=soevzhBfpyZ_}Kp5#-I6Xorq#e44uzLNbV aY|vY~zGq*A>l91?0000|J0VOfUoi)+u z&Upie1d@X79M7F;u``{YPJ!wD5|Z}bJHt8m{GU^V5kk`{Y31%|0W5q%02y97JlLz2 z;=E%FMgW`e@zWyVX^AXI15jrNAubYUK+CVFNM}b(vg+MKAOm7TfdrwwDrb;dU-`yW zzkLhGbcl(>7_e`?4F~)&?Rx;BuJ67xASM!1A-;J*yc)F6DzyefAQ1^@`EmgqFXIaW z+|+m1>o5cokpL3C4%{Scz{NxbhD1^}ko8?lxUu!%=2%NN81qcdefkfhV5F?QcJj<1f7SNTA?HXV*v1|K# zZo^N7J+YW8Z?TwHKn~pDzo%2vvnM})eE!m142%PdFPB%D_yR}ZZ&62F z3~=Czm80A=5GgVv^+*7(B}czD5JhT)TLMTYAQ3q7s!?a$UWiC839w7=&3pXdRv`rq zkPB($HaCAm;9|fc$!q}ZcED>H+HzB!s9>7ISYmyz5H;L5$tvP72%*C@tj5zdK2%4d0@EA-DVo7PF;ow7cCTM%$A)n3z3rb=BdmTZi^hxO?S)j3ko6IuDGvvsN?gXIYBSvQ#ddG}eoG2$80vHqpOa8G1%0 zdZ?W?q|-}6HgtkRCR`tMXf58MAk6c8Oy%d(9m-?9;~xklb*6$rR;&O3002ovPDHLk FV1gWV*{}cr literal 0 HcmV?d00001 diff --git a/website/assets/images/os-windows-dark-24x24@2x.png b/website/assets/images/os-windows-dark-24x24@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..7d6ddbb1d75efadb42904b691f4030de513d7d6f GIT binary patch literal 494 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTC&H|6fVg?2=RS;(M3{v?36l5$8 za(7}_cTVOdki(Mh=+q)+1Tb-Dj!ZIPlqXERy$gos8(92Pv%yg%N!5qZo_%Ca-XU9Ity)O^7+c&x_Uo#5IojEeCBq`6OL0a&E8_NzsMj&(cHSUzO<()4)=dR#Yy>fNB z+?IwOhcBNbW*(X|o0adyk$FzaO|{`mi^4M&W$d|l^i}%&nbmq;qEX7$TC5jX*}T>V z$$7k8*xzlfD{A&}sesg?SI?&NX-W%k2y{Ee*=W;r@Pv7gOH|tecCnQq2X^ic<+)h1 gt115PDW$ECxyuS~t@3By0*W36Pgg&ebxsLQ0PHEnVgLXD literal 0 HcmV?d00001 diff --git a/website/assets/js/pages/osquery-table-details.page.js b/website/assets/js/pages/osquery-table-details.page.js index 89b6f653a04..00daccd23bd 100644 --- a/website/assets/js/pages/osquery-table-details.page.js +++ b/website/assets/js/pages/osquery-table-details.page.js @@ -11,6 +11,7 @@ parasails.registerPage('osquery-table-details', { 'darwin': 'macOS', 'linux': 'Linux', 'windows': 'Windows', + 'chromeos': 'ChromeOS', 'all': 'All platforms' }, }, diff --git a/website/views/pages/osquery-table-details.ejs b/website/views/pages/osquery-table-details.ejs index b9baa2b9ec6..dc297c9df4f 100644 --- a/website/views/pages/osquery-table-details.ejs +++ b/website/views/pages/osquery-table-details.ejs @@ -17,6 +17,8 @@ @click="clickFilterByPlatform('linux')">Linux +
@@ -68,9 +70,10 @@
- Linux logo - Windows logo - macOS logo + macOS logo + Windows logo + Linux logo + macOS logo
<%- partial(path.relative(path.dirname(__filename), path.resolve( sails.config.appPath, path.join(sails.config.builtStaticContent.compiledPagePartialsAppPath, tableToDisplay.htmlId)))) %>
diff --git a/website/views/pages/query-detail.ejs b/website/views/pages/query-detail.ejs index 624cc8d6aa6..0cb033d8d0a 100644 --- a/website/views/pages/query-detail.ejs +++ b/website/views/pages/query-detail.ejs @@ -34,9 +34,10 @@
Platforms

--

- macOS - Windows - Linux + macOS + Windows + Linux + ChromeOS
diff --git a/website/views/pages/query-library.ejs b/website/views/pages/query-library.ejs index 1db97ac1867..ac1010adef6 100644 --- a/website/views/pages/query-library.ejs +++ b/website/views/pages/query-library.ejs @@ -33,6 +33,7 @@ + @@ -62,7 +63,7 @@

compatible with

@@ -120,14 +122,17 @@
+
From 0faba31dd512e998d2f80cf66ebc28fe3b90e63d Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 29 May 2023 13:16:25 -0500 Subject: [PATCH 2/5] Update get-extended-osquery-schema to capitalize ChromeOS --- website/api/helpers/get-extended-osquery-schema.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/api/helpers/get-extended-osquery-schema.js b/website/api/helpers/get-extended-osquery-schema.js index ac806d8e5f1..4652aa1e398 100644 --- a/website/api/helpers/get-extended-osquery-schema.js +++ b/website/api/helpers/get-extended-osquery-schema.js @@ -149,6 +149,8 @@ module.exports = { for(let platform of columnHasFleetOverrides.platforms) { if(platform === 'darwin') { platformWithNormalizedNames.push('macOS'); + } else if(platform === 'chromeos') { + platformWithNormalizedNames.push('ChromeOS'); } else { platformWithNormalizedNames.push(_.capitalize(platform)); } From 1be155df0ba00bc8390c799972d2e31d9b30e692 Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 29 May 2023 13:16:48 -0500 Subject: [PATCH 3/5] Update generated markdown tables for osquery schema tables --- website/scripts/build-static-content.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/website/scripts/build-static-content.js b/website/scripts/build-static-content.js index 47166eaa1a1..22f45bc0cca 100644 --- a/website/scripts/build-static-content.js +++ b/website/scripts/build-static-content.js @@ -581,14 +581,17 @@ module.exports = { let platformString = '
**Only available on ';// start building a string to add to the column's description - if(column.platforms.length === 2) { // Because there are only three options for platform, we can safely assume that there will be at most 2 platforms, so we'll just handle this one of two ways - // If there are two values in the platforms array, we'll add the capitalized version of each to the columns description - platformString += column.platforms[0]+' and '+ column.platforms[1]; + if(column.platforms.length === 3) { // Because there are only four options for platform, we can safely assume that there will be at most 3 platforms, so we'll just handle this one of three ways + // If there are three, we'll add a string with an oxford comma. e.g., "On macOS, Windows, and Linux" + platformString += `${column.platforms[0]}, ${column.platforms[1]}, and ${column.platforms[2]}`; + } else if(column.platforms.length === 2) { + // If there are two values in the platforms array, it will be formated as "[Platform 1] and [Platform 2]" + platformString += `${column.platforms[0]} and ${column.platforms[1]}`; } else { // Otherwise, there is only one value in the platform array and we'll add that value to the column's description platformString += column.platforms[0]; } - platformString += ' devices.** '; + platformString += '** '; columnDescriptionForTable += platformString; // Add the platform string to the column's description. } tableMdString += ' | '+column.name+' | '+ column.type +' | '+columnDescriptionForTable+'|\n'; From 1ebe3987f21fce6761ed102c5d61f4eb038752ff Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 29 May 2023 20:12:16 -0500 Subject: [PATCH 4/5] Update build-static-content.js --- website/scripts/build-static-content.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/scripts/build-static-content.js b/website/scripts/build-static-content.js index 22f45bc0cca..99963d20630 100644 --- a/website/scripts/build-static-content.js +++ b/website/scripts/build-static-content.js @@ -581,6 +581,10 @@ module.exports = { let platformString = '
**Only available on ';// start building a string to add to the column's description + if(column.platforms.length > 3) {// FUTURE: add support for more than three platform values in columns. + throw new Error('Support for more than three platforms has not been implemented yet.') + } + if(column.platforms.length === 3) { // Because there are only four options for platform, we can safely assume that there will be at most 3 platforms, so we'll just handle this one of three ways // If there are three, we'll add a string with an oxford comma. e.g., "On macOS, Windows, and Linux" platformString += `${column.platforms[0]}, ${column.platforms[1]}, and ${column.platforms[2]}`; From ab7ce742bcf15f1cb31d5afaf4f0f8f78c9ad67c Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 29 May 2023 20:25:07 -0500 Subject: [PATCH 5/5] fix lint error --- website/scripts/build-static-content.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/scripts/build-static-content.js b/website/scripts/build-static-content.js index 99963d20630..a0987c9802b 100644 --- a/website/scripts/build-static-content.js +++ b/website/scripts/build-static-content.js @@ -582,7 +582,7 @@ module.exports = { let platformString = '
**Only available on ';// start building a string to add to the column's description if(column.platforms.length > 3) {// FUTURE: add support for more than three platform values in columns. - throw new Error('Support for more than three platforms has not been implemented yet.') + throw new Error('Support for more than three platforms has not been implemented yet.'); } if(column.platforms.length === 3) { // Because there are only four options for platform, we can safely assume that there will be at most 3 platforms, so we'll just handle this one of three ways