-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from faraazahmad/housekeeping
chore: perform housekeeping
- Loading branch information
Showing
6 changed files
with
25 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# frozen_stirng_literal: true | ||
|
||
RSpec.describe Tainted::Lint do | ||
context "Given a file with tainted sources and sinks" do | ||
it "returns a result listing the taint errors" do | ||
file = File.expand_path "#{__dir__}/../../fixtures/simple.rb" | ||
lint = Tainted::Lint.new(file, %i[tainted], %i[unsafe]) | ||
result = lint.analyze | ||
|
||
expect(result).to eq( | ||
[ | ||
"Method `unsafe()` consuming tainted variable `d`", | ||
"Method `unsafe()` consuming tainted variable `c`" | ||
] | ||
) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters