1 source 'http://rubygems.org'
2
3 gem 'rails', '3.2.16'
4 gem 'dradis_integration_api', :git => 'https://username@github.com/username/DradisIntegrationApi.git'
1 GIT
2 remote: https://username@github.com/username/DradisIntegrationApi.git
3 revision: 8acde25d25ec32d5d84a40e2c4241b1d9feaeb95
4 specs:
5 dradis_integration_api (0.0.2)
6 rails
7
8 GEM
200 DEPENDENCIES
209 dradis_integration_api!
72 mount DradisIntegrationApi::Engine, :at => "/drapi"
73 end
--
Founder
Security Roots Ltd.
Registered company no 07389856 in England and Wales
--
You received this message because you are subscribed to the Google Groups "Dradis Pro users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dradis-pro+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Rory,
I don't think they are necessarily more heavyweight. As far as I understand them in order to make a plugin into an engine, you just need to add a new file, which defines a class that inherits from Rails::Engine. That's the bare minimum.
> So on this is the idea that each plugin as it is now will become a separate engine? I've not done much with them in the past, but looking at the documentation it looks like quite a heavyweight construct for some of the smaller plugins (e.g. something like a vulnerability database import).
You can see an example of this here:
https://github.com/dradis/dradis-osvdb/blob/master/lib/dradis/plugins/osvdb/engine.rb
Which is basically the same OSVDB plugin structure with a new engine.rb file.
Of course you can get fancier than this and add your own controllers and models inside an engine, but I don't think we'll go that far just yet.
That's one of the things I've been trying to think about on the Community project and the dradis3.x branch of things:
> If we were re-doing existing import/upload/export plugins do you have a note of what additional steps would be needed with the engine model to hook them into Dradis?
https://github.com/dradis/dradisframework/tree/dradis3.x
Right now, our import/upload/export plugins are very 'free form' (which is good), but 80% of the code of each import plugin is the same, and 80% of each upload plugin is the same. What I want to create is a series of Base classes or modules (like Dradis::Plugin::Export::Base, Dradis::Plugin::Import::Base, etc.) that will implement this 80% of the code for you and you'll have to just focus on what's specific to your plugin.
This is work in progress (mostly in my head at the moment) and there is nothing set in stone, but I'm thinking along those lines. I've only started doing a bit of work on the Upload front, for the code components that let the plugins interact with the Upload Manager. But I need to extend those support classes to the other plugin types and define a proper plugin architecture.
In any case, this isn't going to happen overnight. And by the time we get there, you'll have plenty of docs (yes, hold me accountable to this) and plenty of code for the existing plugins to look at.
At the moment the upgrade process takes care of the custom plugins that you may have under your /opt/dradispro/dradispro/shared/plugins. The Addon Manager in the CIC would do something similar to that once we move on to the Engine-based architecture.
> Also sounds we'd need some way of managing gemfile/gemfile.lock files? At the moment does the upgrade process touch that side of things? It would be annoying to have them overwritten by an upgrade
Again, I've been doing some research on the subject and there is not a whole lot of information about how to gem management from the user's point of view, but in a nutshell, the way I think it will work is by having the Gemfile include a CIC-generated file. And having the Addon Manager do the necessary magic in this external file to make sure all the pieces fit together.
But again, this is all mid-to-long term to say the least, stuff I keep thinking about in my *spare* time, but nothing that I'm actively working at the moment.
For the time being a custom plugin as we traditionally had, or an Engine as described by Stefan in this thread should be a good enough solution for those wanting to do a bit of custom development.
HTH,
Daniel
--
Morris's three golden rules of computer security:
do not own a computer;
do not power it on;
and do not use one