Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
71a4b47
Replaces thread/pool with concurrent ruby gem
betarelease Jun 4, 2021
923fd06
Adds missing Gemfile.lock
betarelease Jun 4, 2021
a4db756
Rescues error and prints message to console
betarelease Jun 4, 2021
6e80eb6
Converts code to use concurrent mechanisms from concurrent-ruby gem
betarelease Jun 8, 2021
54511c1
Waits for array to be populated before processing details
betarelease Jun 10, 2021
2edda7e
Uses channels from 'concurrent-edge' gem
betarelease Jun 16, 2021
5123a7a
Logs the created date to the pos file
betarelease Jun 17, 2021
580f3a5
Adds violation ids to help with debugging to the pos file
betarelease Jun 17, 2021
41b2b91
Attempts to add rspec and specs
betarelease Jun 21, 2021
3bcbb9c
Merge branch 'master' into concurrent_ruby
betarelease Jun 21, 2021
d499fa2
Fixes the logic to use known length arrays instead of channels
betarelease Jun 25, 2021
b72c2ba
Moves methods into xray class
betarelease Jun 29, 2021
f0b73e4
Makes a test green using the correct doubles
betarelease Jul 7, 2021
c8f0e97
Pulls violations from a starting date
betarelease Jul 8, 2021
d1adbf4
Pushing live+historic code
MahithaB Jul 12, 2021
bd2171e
Pushing initial historic+lve data changes
MahithaB Jul 12, 2021
6fa046e
Uses ruby function to test file for emptiness
betarelease Jul 13, 2021
ede9a67
Adding pos file per date
MahithaB Jul 13, 2021
90ca029
Resolving conflict
MahithaB Jul 13, 2021
fdcab38
Removes unused config parameters
betarelease Jul 14, 2021
674960b
Uses more idiomatic ruby with parsing of pos file by date
betarelease Jul 14, 2021
7ada334
Adds specs for processed violations
betarelease Jul 15, 2021
2f3367c
Adds spec for writing to pos file
betarelease Jul 15, 2021
7142209
Adding pos_file changes
MahithaB Jul 16, 2021
024cc11
Resolving conflicts
MahithaB Jul 16, 2021
a5cf7eb
Changing param count
MahithaB Jul 19, 2021
c84ea09
xit for processed, file.open for write to file spec
MahithaB Jul 19, 2021
0257fbe
Fixed specs that were breaking because of using each_line
betarelease Jul 19, 2021
2c227ca
Moves logic for file parsing over to its own class
betarelease Jul 19, 2021
ea689fe
Adds Position file class.
betarelease Jul 20, 2021
c2661c4
Adds missing reference to position file
betarelease Jul 20, 2021
ac39c7b
Adding router.emit func, new line in file
MahithaB Jul 20, 2021
e18ed5a
Adding pos_file_path changes
MahithaB Jul 20, 2021
cc4e72d
Ading pos_file_path addition to existing name
MahithaB Jul 20, 2021
a69f11c
Comments on call_home for testing right now
betarelease Jul 21, 2021
1d9d85d
Moves logic into delegates as much as possible
betarelease Jul 21, 2021
145b01c
Moves methods to private in pos_file
betarelease Jul 21, 2021
209118e
Reverting page_num_channel changs for live data
MahithaB Jul 21, 2021
236939c
Removes JSON parsing from receiver
betarelease Jul 23, 2021
9762341
Extracts methods to enable testing of processed logic
betarelease Jul 26, 2021
1b79936
Verifies that the timer task is called
betarelease Jul 26, 2021
4f573bd
Sending tag param to xray
MahithaB Jul 27, 2021
4ce2cff
Adding spec changes for tag
MahithaB Jul 27, 2021
4f90bfb
Printing total violations var
MahithaB Jul 29, 2021
f2a3373
total violations for print statement
MahithaB Jul 29, 2021
1ff290e
Create CI pipeline (#85)
hmitgang Jul 30, 2021
5536458
moved pipelines to ci directory
hmitgang Jul 30, 2021
74a1a6e
Adding test file
MahithaB Aug 2, 2021
404b081
Merge branch 'concurrent_ruby' of https://github.com/jfrog/log-analyt…
MahithaB Aug 2, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
.tox
./idea
.idea/
.DS_Store
.DS_Store
**/test_pos.txt
32 changes: 32 additions & 0 deletions fluentd/plugins/ci/pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
resources:
- name: source_repo
type: GitRepo
configuration:
gitProvider: github_integration
path: jfrog/log-analytics
branches:
include: concurrent_ruby


pipelines:
- name: siem_plugin_test
steps:
- name: siem_plugin_test_step
type: Bash
configuration:
inputResources:
- name: source_repo
trigger: true
runtime:
type: image
image:
custom:
name: ruby
tag: '3.0.2'
autoPull: true
execution:
onExecute:
- cd $res_source_repo_resourcePath/fluentd/plugins/input/fluent-plugin-jfrog-siem
- bundle --version
- bundle install
- rspec
1 change: 1 addition & 0 deletions fluentd/plugins/input/fluent-plugin-jfrog-siem/.rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--require spec_helper
90 changes: 90 additions & 0 deletions fluentd/plugins/input/fluent-plugin-jfrog-siem/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
PATH
remote: .
specs:
fluent-plugin-jfrog-siem (1.0.0)
concurrent-ruby (~> 1.1.8)
concurrent-ruby-edge
fluentd (>= 0.14.10, < 2)

GEM
remote: https://rubygems.org/
specs:
concurrent-ruby (1.1.8)
concurrent-ruby-edge (0.6.0)
concurrent-ruby (~> 1.1.6)
cool.io (1.7.1)
diff-lcs (1.4.4)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
fluentd (1.13.1)
bundler
cool.io (>= 1.4.5, < 2.0.0)
http_parser.rb (>= 0.5.1, < 0.7.0)
msgpack (>= 1.3.1, < 2.0.0)
serverengine (>= 2.2.2, < 3.0.0)
sigdump (~> 0.2.2)
strptime (>= 0.2.2, < 1.0.0)
tzinfo (>= 1.0, < 3.0)
tzinfo-data (~> 1.0)
webrick (>= 1.4.2, < 1.8.0)
yajl-ruby (~> 1.0)
http-accept (1.7.0)
http-cookie (1.0.3)
domain_name (~> 0.5)
http_parser.rb (0.6.0)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2021.0225)
msgpack (1.4.2)
netrc (0.11.0)
power_assert (2.0.0)
rake (12.3.3)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-support (3.10.2)
serverengine (2.2.4)
sigdump (~> 0.2.2)
sigdump (0.2.4)
strptime (0.2.5)
test-unit (3.4.2)
power_assert
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
tzinfo-data (1.2021.1)
tzinfo (>= 1.0.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.7)
webrick (1.7.0)
yajl-ruby (1.4.1)

PLATFORMS
x86_64-darwin-20

DEPENDENCIES
bundler (~> 2.0)
concurrent-ruby (~> 1.1.8)
concurrent-ruby-edge
fluent-plugin-jfrog-siem!
rake (~> 12.0)
rest-client (~> 2.0)
rspec (~> 3.10.0)
test-unit (~> 3.0)

BUNDLED WITH
2.2.3
2 changes: 1 addition & 1 deletion fluentd/plugins/input/fluent-plugin-jfrog-siem/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Bundler::GemHelper.install_tasks
require "rake/testtask"

Rake::TestTask.new(:test) do |t|
t.libs.push("lib", "test")
t.libs.push("lib", "test", 'lib/fluent/plugin')
t.test_files = FileList["test/**/test_*.rb"]
t.verbose = true
t.warning = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

Gem::Specification.new do |spec|
spec.name = "fluent-plugin-jfrog-siem"
spec.version = "1.0.0"
spec.version = "2.0.0"
spec.authors = ["John Peterson", "Mahitha Byreddy"]
spec.email = ["johnp@jfrog.com", "mahithab@jfrog.com"]

Expand All @@ -24,7 +24,12 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "rake", "~> 12.0"
spec.add_development_dependency "test-unit", "~> 3.0"
spec.add_development_dependency "rest-client", "~> 2.0"
spec.add_development_dependency "thread", "~> 0.2.2"
spec.add_runtime_dependency "thread", "~> 0.2.2"
spec.add_development_dependency "concurrent-ruby", "~> 1.1.8"
spec.add_development_dependency "concurrent-ruby-edge", '>= 0'
spec.add_development_dependency 'rspec', '~> 3.10.0'

spec.add_runtime_dependency "rest-client", "~> 2.0"
spec.add_runtime_dependency "concurrent-ruby", "~> 1.1.8"
spec.add_runtime_dependency "concurrent-ruby-edge", '>= 0'
spec.add_runtime_dependency "fluentd", [">= 0.14.10", "< 2"]
end
Loading