
Security News
Open Source Maintainers Demand Ability to Block Copilot-Generated Issues and PRs
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
rcodetools http://eigenclass.org/hiki.rb?rcodetools Copyright (c) 2005-2007 Mauricio Fernandez mfp@acm.org http://eigenclass.org Copyright (c) 2006-2008 rubikitch rubikitch@ruby-lang.org http://www.rubyist.net/~rubikitch/ Use and distribution subject to the terms of the Ruby license.
= Overview rcodetools is a collection of Ruby code manipulation tools. It includes xmpfilter and editor-independent Ruby development helper tools, as well as emacs and vim interfaces.
Currently, rcodetools comprises:
See also README.xmpfilter.
Originally rct-complete and rct-doc were subcommands of xmpfilter. Actually they use xmpfilter's code heavily. But the relationship between xmpfilter (annotation) and completion/doc is not intuitive, so I (rubikitch) split it into separate executables.
= Usage xmpfilter, rct-complete and rct-doc take its input from stdin and write to stdout. They can run in several modes; see xmpfilter -h rct-complete -h rct-doc -h rct-meth-args -h rct-fork -h rct-fork-client -h ruby-toggle-file -h rbtest -h README.emacs and README.vim describe how to use rcodetools from your editor.
= Accurate Completion Internal and Caveat rct-complete and rct-doc use xmpfilter engine, ie they get runtime information by executing code. In Ruby (dynamic languages), type of any expressions except literals cannot be known without actually executing code. Moreover Ruby has open classes and singleton methods. Rcodetools asks `ruby' run-time informations, so we can get very accurate informations. Completion and document browsing are essentially identical operations, they both need the object value in question. Therefore we discuss completion.
rct-complete does: (1) replaces target line with completion magic (it calculates methods the target object has). (2) executes modified script. (3) once the control reaches completion magic, modified script exits. (4) outputs in specified format. (list candidates, EmacsLisp...)
But this methodology has two big drawbacks, side-effects and inability to get any informations of uncovered code!
An extreme side-effect example: File.unlink a_file File. <-
If you call rct-complete, it removes a_file (sends a mail, accesses DB ...). So you must be careful to use, especially at TOPLEVEL. I (rubikitch) often experiment at TOPLEVEL with rcodetools, I NEVER use irb(sh) since rcodetools!
An uncovered code example: def foo 1. <- end
If the code does not call foo, we cannot do any completions.
Useless eh? But we already have a way to elude the drawbacks, test scripts (unit tests)! Test scripts are self-enclosed and expected to be executed, so side-effects are not problem. Moreover tests call methods we write. Because Ruby's Test::Unit has an ability to test only one test method, we can do lightning-fast completion. Let's call it Test-Driven Completion (TDC).
To support TDC, rct-complete has -t option. With -t, it concatenate modified script and test/unit code. If the control does not reach target line, test/unit code calls the line.
How do we select test script and test method? The editor selects recently selected buffer of test script as test script of TDC, because the test-infected tend to go and return between test script and implementation script. It considers files matching /test.*.rb/ as test script. It selects test method at the cursor position.
TDC adds roles of test scripts. Enjoy TDC magic!
See also README.TDC.
= License rcodetools is licensed under the same terms as Ruby.
FAQs
Unknown package
We found that rcodetools 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
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
Research
Security News
Malicious Koishi plugin silently exfiltrates messages with hex strings to a hardcoded QQ account, exposing secrets in chatbots across platforms.
Research
Security News
Malicious PyPI checkers validate stolen emails against TikTok and Instagram APIs, enabling targeted account attacks and dark web credential sales.