JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.
If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.
If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.
| CodeSonar® 9.2p0 | CONFIDENTIAL | CodeSecure Inc |
The CodeSonar user search language allows you to specify search conditions based on various hub user account properties, and provides basic logical operators for combining multiple conditions.
The user search language grammar is based on the standard CodeSonar search grammar, with several extensions:
Literal strings are displayed in pink text.
T : quoted-string | property-condition | ilike-condition | imatch-condition | field-condition | ( T ) | unary T | T binary T | T T | word property-condition : property-tag operator boolean property-tag : the lower-case version of the short name of any global permission on the hub ext-operator : < | <= | >= | > field-name : alerts | analysis_own_warnings | default_role | email | enabled | last_login_address | last_login_time | name
The following table shows the relationship between the user-specific field-name values and the properties of a hub user account, along with the expected type of the condition part of a field-condition.
Although property-tag is not a field-name value, we include it in this table for completeness.
Most of the field-name values in the user search language are only available to users with G_ADMINISTER_USERS permission.
| field-name | Contents | Condition Type | Requires G_ADMINISTER_USERS? |
|---|---|---|---|
| alerts | Email Alerts? | boolean | YES |
| analysis_own_warnings |
Whether or not the user account has ANALYSIS_OWN_WARNINGS permission for
the specified analysis through one
or more Roles.
|
boolean | int | no |
| default_role | Default Role . Role Name | word | quoted-string | YES |
| word | quoted-string, or special value none. | YES | ||
| enabled | Whether or not the user account has G_SIGN_IN permission through one or more
Roles. (enabled is therefore equivalent to g_sign_in.) |
boolean | no |
| last_login_address | Last
Login Address Search terms are compared directly against the Last Address string (available in the table in the Users page) - the search does not take address aliasing into account. |
word | quoted-string, or special value none. | YES |
| last_login_time | Last Login Time | date-range | YES |
| name | Username | word | quoted-string | no |
Plain text search terms—word and quoted-string—are compared against the name field, with the PostgreSQL ILIKE operator:
| Example | Explanation |
|---|---|
| alerts:false | Find users that do not have email alerts enabled. |
| analysis_own_warnings:true | Find users that have ANALYSIS_OWN_WARNINGS permission for at least one analysis on the hub. |
| analysis_own_warnings:2 | Find users that have ANALYSIS_OWN_WARNINGS permission for the analysis whose analysis ID is 2. |
| default_role=Anyone | Find users whose default role is Anyone. |
| email:@example.com | Find users whose email contains this substring. |
| enabled:false | Find disabled users: those that do not have G_SIGN_IN permission through any of their Roles. |
| enabled:true g_sign_in:false | Never finds any users, because enabled and g_sign_in are equivalent. |
| last_login_address:192.0.2. | Find users who last signed in from a machine whose IP address contains this substring. |
| last_login_address=~^2001:db8:.* | Find users who last signed in from a machine whose IP address matches this regular expression. |
| last_login_address:none | Find users who have never signed in. |
| last_login_time:2021 | Find users who last signed in in 2021. |
| name:alex | Find users whose username contains this substring. |
| alex | Find users whose username contains this substring (equivalent to searching for name=~~alex). |
To report problems with this documentation, please visit https://support.codesecure.com/.