-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Auto Run UI #3031
Auto Run UI #3031
Conversation
Thank you for the PR. We will review soon |
spec/beef/api/auth_rate_spec.rb
Outdated
|
||
it 'adheres to random bad passords and 1 correct auth rate limits' do | ||
# create api structures with bad passwords and one good | ||
passwds = (1..9).map { |i| "bad_password"} # incorrect password |
Check failure
Code scanning / CodeQL
Hard-coded credentials Critical test
used as credentials
typeAhead: true, | ||
listeners: { | ||
select: async function(combo) { | ||
const selectedModuleId = combo.getValue() |
Check notice
Code scanning / CodeQL
Semicolon insertion Note
the enclosing function
ruleContainer.removeAll(); | ||
|
||
for (let i = 0; i < rules.length; i++) { | ||
ruleForm = new AutoRunRuleForm( |
Check warning
Code scanning / CodeQL
Missing variable declaration Warning
* moveDown: moves the module down one spot in the Auto Run exection order. | ||
*/ | ||
AutoRunModuleForm = function(moduleData, deleteFn, moveUp, moveDown, ruleId, index, moduleList) { | ||
const moduleTextAreaId = `rule-${ruleId}-module-textarea-${index}`; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
*/ | ||
AutoRunModuleForm = function(moduleData, deleteFn, moveUp, moveDown, ruleId, index, moduleList) { | ||
const moduleTextAreaId = `rule-${ruleId}-module-textarea-${index}`; | ||
const chainModeComboId = `rule-${ruleId}-module-combo-${index}`; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Thanks for the integration tests! I forked the Wiki for this repo and made changes. I don't quite know how to include those changes in this PR though. Is it even possible to do that? |
Stale pull request message |
Stale pull request message |
@LauchieHarvey Thanks a lot for your work and implementation of Auto functional. |
Pull Request
Category
e.g. Bug, Module, Extension, Core Functionality, Documentation, Tests
Feature/Issue Description
Q: Please give a brief summary of your feature/fix
A: The user can now create, read, update and delete Auto Run rules from the Admin User Interface. This saves them from having build their own client or use a tool like cURL.
Q: Give a technical rundown of what you have changed (if applicable)
A:
UI Changes
I have added some ExtJS classes for the form input elements. The best way to test the UI changes is by running it, but I've attached a screenshot below too. It's not pretty. It might be worth experimenting with different UX designs, but my lack of experience with ExtJS slows me down when modifying the UI:

API Changes
I have also made some changes to the API. The changes to the API are why I have marked this as a draft, since I'm not sure if they're strictly necessary and I'm aware that changing the API can have unintended consequences for existing users.
The format it returns the modules in has changed as depicted below:
Test Cases
Q: Describe your test cases, what you have covered and if there are any use cases that still need addressing.
A: Honestly I haven't done much testing besides hooking a browser with a UI-added autorun rule and seeing that the Pretty Theft module ran successfully with command output.
Wiki Page
If you are adding a new feature that is not easily understood without context, please draft a section to be added to the Wiki below.
I will modify the Wiki to reflect API changes if and when we agree on them :) Do we think it would be worth adding Auto Run UI documentation to the Wiki too?
Additionally, I think there is a mistake in the Wiki describing the API since it said that the url
/api/autorun/rule/list/all
should list all of the rules, when the ruby API seems to expose that endpoint on/api/autorun/rules
instead. My knowledge of ruby is comically minimal though, so I could well be incorrect.