Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance core run script execute commands #37250

Merged
merged 57 commits into from
Dec 8, 2024

Conversation

kamalq97
Copy link
Contributor

@kamalq97 kamalq97 commented Nov 17, 2024

Related Issues

fixes: link to the issue

Description

Add is_raw_command boolean arg and command_type to the core-run-script-execute-commands and xdr-run-script-commands-execute command

  • is_raw_command is by default false, setting it to true prevents splitting by commas (i.e. argToList won't be called)
  • command_type is by default null, setting to powershell adds a powershell -Command prefix and carries out Powershell-complient quote escaping

@kamalq97 kamalq97 self-assigned this Nov 17, 2024
@kamalq97 kamalq97 changed the title Enchance core run script execute commands Enhance core run script execute commands Nov 17, 2024
@kamalq97 kamalq97 added enhancement python Pull requests that update Python code labels Nov 17, 2024
Copy link

github-actions bot commented Nov 17, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
Packs/ApiModules/Scripts/CoreIRApiModule
   CoreIRApiModule.py175926984%243, 286, 289, 294, 308, 339, 346, 360, 364, 368, 375, 382, 389, 396, 417, 463, 468, 509, 524, 535, 547, 606–607, 613–618, 643, 649, 655, 667, 677, 683, 702, 714, 720, 726, 738, 748, 754, 790, 804, 829, 858, 874, 876, 984, 1014, 1017, 1027, 1096, 1102, 1122, 1128, 1130, 1157, 1173, 1359, 1383, 1389, 1402, 1404–1405, 1407, 1413–1414, 1420–1421, 1427, 1434–1435, 1468, 1470, 1516, 1523, 1530, 1536, 1542, 1549, 1556, 1566, 1611, 1613, 1642, 1725–1731, 1736, 1741–1744, 1746–1747, 1749–1750, 1755, 1761, 1763, 1767, 1774–1775, 1790–1791, 1807, 1812, 1820, 1868–1870, 1874, 1877, 1901, 1986, 1992, 1996, 2000, 2005, 2011, 2023–2024, 2030, 2035, 2041, 2044–2046, 2078, 2082, 2084, 2148, 2154, 2248, 2263, 2336, 2342, 2346, 2350, 2353, 2436–2440, 2442, 2460, 2596, 2610–2612, 2615, 2668–2670, 2673, 2827, 2838, 2841–2843, 2847–2850, 2854–2855, 2861, 2863–2867, 2871, 2877, 2879–2880, 2882, 2886–2889, 2891, 2898, 2900–2901, 2904–2908, 2911, 2913, 2915, 2917–2920, 2924–2925, 2927–2932, 2934, 2965, 3140–3143, 3147–3148, 3159, 3259, 3288, 3290, 3292, 3539–3540, 3632–3634, 3642, 3663, 3789–3792, 3879, 3887, 3891–3892, 3950–3952, 3958, 3997, 4011, 4018, 4025, 4067, 4074, 4081, 4088, 4095, 4299, 4335–4338, 4340–4342, 4445, 4479, 4485, 4492, 4494, 4501, 4503, 4521, 4544
Packs/Core/Integrations/CoreIOCs
   CoreIOCs.py3088173%53, 61, 63, 73, 89, 94, 111, 173–174, 235, 264, 294–301, 303–305, 307–308, 316, 337, 342, 351, 355–359, 363–364, 366, 370–372, 383, 396–407, 409, 433–441, 448–453, 459–468, 470–472
Packs/Core/Integrations/CortexCoreIR
   CortexCoreIR.py661281%39–42, 44, 47, 50, 57, 62, 65, 67, 120
Packs/CortexXDR/Integrations/CortexXDRIR
   CortexXDRIR.py6708687%59, 67, 71–73, 144–145, 206–210, 212, 215, 218, 222, 248–252, 254, 261–264, 275, 278, 281, 287, 290, 316, 321, 329, 331, 334–338, 340, 423–428, 477, 515, 530–531, 548, 558, 618, 621, 648, 655, 657, 734–735, 737, 790, 992–994, 997, 1000, 1005, 1061, 1087, 1120–1121, 1174, 1183, 1185–1187, 1190, 1193–1194, 1231–1234, 1266, 1283
Packs/ctf01/Integrations/CortexXDRIRCTF
   CortexXDRIRCTF.py4644640%1–7, 10, 12–14, 16–18, 20, 37, 44, 52–57, 60–68, 71–72, 75–76, 79–80, 83–88, 91–98, 101, 109–121, 123–125, 128, 130, 134–138, 140, 143, 145, 153, 159, 163, 166–171, 173, 179–182, 184, 186, 210–211, 213, 218–219, 221–222, 226–227, 232–234, 240–241, 247–248, 253, 258–262, 265–266, 272–273, 279–280, 286–287, 293–294, 300–301, 303, 309, 311, 313, 321, 326, 333, 335, 337–342, 344, 346–347, 353, 360, 362–363, 369, 377, 379–380, 386, 389–391, 394, 402–404, 406, 410–412, 414, 417–418, 420–425, 428–429, 431, 434, 443–445, 447–449, 451–452, 455, 457–458, 547–554, 556, 558–559, 562, 564–565, 567, 569–570, 572, 574, 579, 582, 584–591, 593–597, 599, 601–609, 616, 618, 631, 634–638, 642–643, 648–650, 652, 654, 656, 658, 671, 673, 680, 683–687, 689, 692, 694, 697, 699, 706, 709–711, 713–715, 717–718, 720–722, 724–725, 727, 729–730, 732, 735–739, 741, 744, 748–753, 756–760, 769–770, 772–775, 777, 780–783, 785–786, 788, 791–793, 795, 797–799, 801, 803–806, 808, 811–813, 815–816, 819, 821, 825–826, 828–829, 831, 834, 837–838, 842, 845, 847–850, 852, 854, 860, 865, 870–871, 874–875, 877–879, 882, 885, 890, 896, 902, 1156, 1159, 1175–1176, 1180–1181, 1183–1184, 1186–1188, 1190–1191, 1196–1197, 1202, 1208–1210, 1212, 1214–1215, 1219–1220, 1222, 1224–1225, 1227–1229, 1235–1236, 1239–1240, 1242–1243, 1245–1247, 1249–1251, 1254, 1256–1257, 1259, 1261, 1263, 1266–1267, 1269–1270, 1275, 1280, 1283, 1285, 1293–1297, 1300, 1308, 1312, 2225–2228, 2230–2231, 2233, 2235, 2247, 2256–2258, 2260–2265, 2267, 2271, 2273, 2276, 2285, 2288–2293, 2295–2296, 2302, 2306, 2308, 2310, 2314
TOTAL326791272% 

Tests Skipped Failures Errors Time
371 4 💤 0 ❌ 0 🔥 30.141s ⏱️

@kamalq97 kamalq97 requested a review from dorschw November 18, 2024 16:26
@kamalq97 kamalq97 marked this pull request as ready for review November 19, 2024 08:19
@kamalq97 kamalq97 requested a review from maimorag as a code owner November 19, 2024 08:19
Packs/Core/Integrations/CortexCoreIR/CortexCoreIR.yml Outdated Show resolved Hide resolved
Packs/Core/Integrations/CortexCoreIR/CortexCoreIR.yml Outdated Show resolved Hide resolved
Packs/CortexXDR/Integrations/CortexXDRIR/CortexXDRIR.yml Outdated Show resolved Hide resolved
Packs/ctf01/ReleaseNotes/1_1_0.md Outdated Show resolved Hide resolved
Packs/ctf01/pack_metadata.json Outdated Show resolved Hide resolved
@kobymeir
Copy link
Contributor

kobymeir commented Dec 2, 2024

This PR was automatically updated by a GitHub Action

  • ctf01 pack version was bumped to 1.0.33.
  • CortexXDR pack version was bumped to 6.1.95.

To stop automatic version bumps, add the ignore-auto-bump-version label to the github PR.

@CLAassistant
Copy link

CLAassistant commented Dec 3, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ kamalq97
❌ Content Bot


Content Bot seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@kamalq97 kamalq97 added the ignore-auto-bump-version Not to run autobump release notes job on this pr. label Dec 3, 2024
@demisto demisto deleted a comment from CLAassistant Dec 4, 2024
@kamalq97 kamalq97 merged commit fa99f66 into master Dec 8, 2024
16 of 17 checks passed
@kamalq97 kamalq97 deleted the CIAC-12103-enchance-core-run-script-execute-commands branch December 8, 2024 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-approved enhancement ignore-auto-bump-version Not to run autobump release notes job on this pr. python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants