Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Querylet is a templating language for SQL and is designed to make writing raw SQL much easier.
SELECT
questions.id,
questions.uuid,
questions.question_html as question,
questions.target_type as kind,
{{#object}}
SELECT
case_study_questions.menu,
case_study_questions.questions_pool_size,
CASE {{str sub_question_type}}
WHEN 'MultiChoiceQuestion' THEN
{{> object 'questions.multiple_choice' id='{{sub_question_id}}' }} as question
WHEN 'MultiSelectQuestion' THEN
{{> object 'questions.multiple_select' id='{{sub_question_id}}' }} as question
END,
{{#array}}
SELECT
que.id,
que.uuid,
que.target_type as kind,
choices.comment,
choices.flagged,
choices.choice_value as answered,
multiple_select_questions.answers_count
FROM ts_admin_que.questions que
LEFT JOIN public.choices ON choices.question_id = que.id AND choices.attempt_id = {{id}}
LEFT JOIN ts_admin_que.multiple_select_questions ON multiple_select_questions.id = que.target_id AND que.target_type = 'MultipleSelectQuestion'
WHERE
que.id = ANY(case_study_questions.question_ids)
{{/array}} as questions
{{/object}} as case_study
FROM ts_admin_que.questions
LEFT JOIN ts_admin_que.case_study_questions ON case_study_questions.question_id = questions.id
WHERE
questions.id = {{id}}
Cast variable to integer
{{int my_number}}
Cast variable to string
{{str my_string}}
Cast variable to float
{{float my_number}}
Cast to array (not a postgres array)
{{arr my_array}}
Wildcard front and back of string
{{wild my_string}}
{{my_variable}}
{{> include 'link.to.path' name='andrew' }}
{{> include 'link.to.path' name={{my_name}} }}
{{> include 'link.to.path' name={{str my_name}} }}
{{#array}}
{{/array}}
{{#if variable}}
{{else}}
{{/end}}
https://www.youtube.com/watch?time_continue=873&v=ET_POMJNWNs&feature=emb_title https://kschiess.github.io/parslet/parser.html https://www.rubydoc.info/github/kschiess/parslet/Parslet/Atoms/Scope
https://www.rubydoc.info/github/kschiess/parslet/Parslet/Atoms/Capture
str('Boston').parse('Boston') #=> "Boston"@0
The @0 is the offset
https://www.sitepoint.com/parsing-parslet-gem/
If the parser.rb runs into errors you can add the following to help debug what is happening
require 'parslet/convenience'
parser.parse_with_debug(input)
To see all the define rules check out parser_spec.rb
bundle exec rspec spec/parser_spec.rb
You capture patterns in your deep nested hash and the pass to a tree
The tree does something with your captured patterns
FAQs
Unknown package
We found that querylet demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.